Automatically generate DBML schema files from your Prisma schema for database visualization.
prisma-dbml-generator is a Prisma generator that automatically converts Prisma schema files into DBML (Database Markup Language) format. It solves the problem of manually creating and maintaining database diagrams by generating visualization-ready DBML files directly from your Prisma schema definitions.
Developers and teams using Prisma ORM who need to visualize their database structure, generate Entity-Relationship Diagrams, or maintain database documentation.
It seamlessly integrates into the Prisma workflow, automatically updating DBML files on every schema generation, ensuring diagrams are always in sync with the actual database schema without manual effort.
Prisma DBML Generator
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Generates DBML files every time `prisma generate` runs, keeping documentation in sync with schema changes without manual intervention, as highlighted in the key features.
Outputs DBML files compatible with tools like dbdiagram.io for instant ER diagram creation, directly from Prisma schema, as shown in the example output and integration.
Maps Prisma models, fields, relations, enums, and comments to DBML tables, columns, references, and notes accurately, demonstrated in the generated schema.dbml example.
Offers configurable options like output directory, file name, and project metadata (e.g., projectName, projectDatabaseType) for seamless integration with dbdocs, as detailed in the additional options table.
Only functions within Prisma projects, making it useless for teams using other ORMs or database tools, and its compatibility is tied to specific Prisma versions, as shown in the version table.
Exclusively generates DBML files; if you need other documentation formats or advanced diagram features not supported by DBML, you'll require additional tools or manual work.
Adds an extra step to the `prisma generate` process, which could slow down build times in large projects with frequent schema changes, though it's integrated into the workflow.