Export tables as DBML or Prisma
The SQL DDL export can now write the same tables as DBML or as a Prisma schema.prisma: set
output to dbml or prisma. DBML and Prisma.
- One layout, three languages. The SQL script, the DBML file and the Prisma schema carry the same tables, columns, keys, enums and foreign keys, so you can pick whichever your tools read.
- DBML for diagrams. Paste the
.dbmlinto dbdiagram.io or dbdocs: tables, enums,checkrules, composite keys and aReffor every foreign key. - Prisma, ready to use. One
modelper table mapped back with@@map, Prisma types with@db.*native types, and both sides of every relation, for PostgreSQL or MySQL. - Checked. DBML is parsed by
@dbml/coreand a Prisma schema must passprisma validatebefore you download it. What a language cannot hold, such as Prisma's missingCHECKconstraint, is listed in the fidelity report.
