Skip to content

Cross-database compatibility #672

@matthewhartstonge

Description

@matthewhartstonge

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) (#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:

Workarounds

  • Use varchar(36), which works across both DBs at the expense of being in-optimal in terms of storage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions