75 rules catch structural errors, best-practice violations, and PostgreSQL antipatterns — before they reach production.
A missing index on a foreign key slows every JOIN. A char(n) column wastes space. A serial instead of identity creates hidden sequences. These aren't bugs — they're design debt that compounds over time. PgDesigner checks for all of them automatically.
Structural integrity — FK to missing table, duplicate names, PK column not found, unknown types, empty enums, multiple identity columns.
Best practices — FK type mismatch, missing FK index, circular FK, no primary key, overlapping indexes, reserved words, PG version compatibility.
Antipatterns — char(n) → text, serial → identity, money → numeric, json → jsonb, timestamp → timestamptz, text PKs, too many indexes.
Don't just find problems — fix them. PgDesigner can automatically resolve 15 common issues:
In the UI, click the fix button next to any fixable issue. In the CLI, run pgdesigner lint -fix schema.pgd to apply all fixes at once.
| Tool | Rules | Scope |
|---|---|---|
| PgDesigner | 75 | Schema model validation |
| Squawk | ~20 | Migration SQL linting |
| pglinter | 6 | Live DB |
| schemalint | 4 | Live DB |
| Atlas | 3 | Schema-as-code |
Squawk focuses on runtime migration hazards (locks, rewrites). PgDesigner validates the schema model — catching structural and design issues before any SQL is generated.
pgdesigner lint schema.pgd
pgdesigner lint -f json schema.pgd
pgdesigner lint -s error schema.pgd
pgdesigner lint -fix schema.pgd Exit code 1 if any errors are found — plug it into CI and block merges with broken schemas. Use -f json for machine-readable output, -s error to filter by severity.
Press Ctrl+L to open Check Diagram. Results are grouped by severity — click any issue to navigate to the problematic object. Autofix button appears next to fixable rules. You can ignore rules per table or globally in project settings.