PgDesigner

Git-Friendly Schema Format

Review schema changes like code — clean diffs, meaningful context, near-zero merge conflicts.

The problem with other tools

When you save a schema in pgModeler, the XML reorders elements and changes hundreds of lines. DrawDB dumps everything into a single JSON blob. dbdiagram.io doesn't even give you a local file. Reviewing these diffs in a pull request is impossible.

One column = one line in the diff

PgDesigner's .pgd format is XML designed specifically for version control. Each column is a single self-closing element with all attributes inline:

<table name="users" schema="public">
  <column name="id" type="bigint" nullable="false"/>
  <column name="email" type="varchar(255)" nullable="false"/>
  <column name="created_at" type="timestamptz" default="now()"/>
  <primary-key>
    <column name="id"/>
  </primary-key>
</table>

Adding a column produces exactly one line in git diff:

  <column name="email" type="varchar(255)" nullable="false"/>
+ <column name="phone" type="varchar(20)"/>
  <column name="created_at" type="timestamptz" default="now()"/>

Closing tags like </table> give context in diffs — you always know which table was changed, unlike JSON's anonymous closing braces.

Why not HCL, DBML, or JSON?

vs pgModeler XML

Monolithic file, element order changes on every save. Diffs are unreadable.

vs DrawDB JSON

Single JSON blob — entire file shows as changed. No meaningful context.

vs Atlas HCL

Clean diffs, but no visual editor. CLI-only workflow.

vs dbdiagram DBML

Text-based and git-friendly, but SaaS — no local files unless you export.

Split-model for large schemas

For schemas with 50+ tables, enable split-model. Each object gets its own file — merge conflicts drop to nearly zero because different developers edit different files:

project/
  project.pgd           # metadata, layouts, settings
  tables/
    users.pgd
    orders.pgd
    products.pgd
  views/
    order_summary.pgd
  functions/
    calculate_total.pgd

The visual editor works identically — you open project.pgd and see everything. The split is transparent.