feat(db): print the Postgres side of a new migration with gen:pg-migration

The script builds a scratch database the way a boot does (the baseline, then
the migrations after its cut) up to the target migration, compares it with the
entities by PARITY-PG's rules and prints the remaining statements as the
postgres member of engineDdl. The scratch database is always dropped.
This commit is contained in:
Maurice
2026-11-17 11:48:17 +01:00
parent 8c5e138150
commit 90f1f1977d
4 changed files with 271 additions and 1 deletions
+1
View File
@@ -39,6 +39,7 @@
"check:db-types": "node --import tsx scripts/generate-db-types.ts --check",
"gen:pg-baseline": "node --import tsx scripts/generate-pg-baseline.ts",
"check:pg-baseline": "node --import tsx scripts/generate-pg-baseline.ts --check",
"gen:pg-migration": "node --import tsx scripts/generate-pg-migration.ts",
"probe:pg": "node --import tsx scripts/pg-probe.ts",
"format": "prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"",
"format:check": "prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"",