Cross-database compatibility
- Dominant language
- JavaScript
- Stars
- 3.7k
- Forks
- 233
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 4
Description
Hey Team,
First off, thank you for this awesome project!
I'm currently working on a use case where it's "Bring Your Own DB" (BYODB) and was wondering what the types supported are? The first issue I hit with MySQL and Postgres was binary support for storing UUIDs.
My first reading of the docs _suggested_ that DBML sat at a higher level which led me to believe that would generate the specific types per-database output:
> DBML is database-agnostic and designed for the high-level database architecting instead of low-level database creation
AFAIK you've got two choices, `varchar(36)` or `binary(16)` (https://github.com/holistics/dbml/issues/544) at least in MySQL world, which should be either `uuid` or `bytea` in postgres.
Is there a way to work with different types across multiple database backends where types need to differ?
I would like my DBML to be the single source of truth 😄
## Related issues:
- https://github.com/holistics/dbml/issues/544
## Workarounds
- Use `varchar(36)`, which works across both DBs at the expense of being in-optimal in terms of storage.
Contributor guide
Assessment
This issue has not been assessed yet.