Right now, Postgres to dbdocs and then back to Postgres. I have automated with scripts; next is GitHub Actions.
I am trying to understand where DbDiagram comes into play if I am editing my DBML in a IDE.
Convince me why I should buy db diagram ![]()
Right now, Postgres to dbdocs and then back to Postgres. I have automated with scripts; next is GitHub Actions.
I am trying to understand where DbDiagram comes into play if I am editing my DBML in a IDE.
Convince me why I should buy db diagram ![]()
Hi @JayOnSoftware,
First, I would like to know about your current use case: What are you using to generate the DBML from Postgres today, and what does the trip back to Postgres do?
Either way, here is a setup that keeps you in the IDE and covers both dbdiagram and dbdocs.
The VS Code extension (docs) gives you the ERD rendered beside the file you are already editing, with DBML syntax highlighting. It can also generate DBML directly from a database connection, which may replace part of your script.
The dbdiagram CLI (docs) handles both ends from the terminal:
npm install -g dbdiagram
dbdiagram auth login
dbdiagram init --entry schema.dbml --diagram-id <id> --project-url myteam/myproject
dbdiagram push and dbdiagram pull sync your DML file with dbdiagram.iodbdiagram build document publishes the dbdocs project.Also, with our recommended setup, your workflow will be agent-friendly, since the AI agent can edit the .dbml locally and help you do the other works.
When you buy the dbdiagram paid plan, the extension renders the Pro features in the editor, not only on the web: table groups, custom colors for tables, groups and relationship lines, sticky notes, detail levels, and saved diagram views.
I have inherited a massive, undocumented database (thousands of tables). We bring the DDL into DBML, use DBDocs to document it, and then push the DDL back to PG. DbDocs is perfect for documenting but when i want to add pk/fk to but now i have to use my editor or use dbdiagram.
My current flow
Pull the scheme from Pg and save it as a dbml file. Go add Fk/Ph using an editor (Love to see if i can use this using dbdocs it will be nice, all point and click).
Upload the schema to the DB docs so the business folks (non-technical) can come and document the data.
Pull the schema, generate DDL, and update Pg.
Use GitHub so things donβt get deleted.