Cross-database compatibility

Aperta
#672 2 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
mysql, postgresql
Ambito
databases

Direzione di ricerca

Inizia leggendo l'issue correlata #544 e la documentazione attuale sui tipi DBML e sull'output del database. Determina come una singola definizione DBML potrebbe esprimere tipi UUID specifici del backend, quindi documenta il comportamento supportato e definisci i risultati previsti per MySQL e PostgreSQL.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

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:

Workarounds

  • Use varchar(36), which works across both DBs at the expense of being in-optimal in terms of storage.
Lingua principale
JavaScript
Stelle
3.7k
Fork
233
Merge medio
2g 4h
PR unite (30g)
23

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di holistics/dbml

Tutte le issue di holistics/dbml

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.