fix(db): refuse to regenerate a frozen Postgres baseline and check its trigger ports once frozen

gen:pg-baseline rewrote the baseline with its cut at the newest migration on
disk, so after a migration landed after the cut, running it moved the cut over
that migration while Postgres installs created from the old baseline would
still run it through the migrator. It now refuses while a migration follows the
committed cut, names those migrations and the routine, and moves the cut only
with --move-cut (lint:dialect keeps such a migration under the post-cut rules
either way).

check:pg-baseline stopped comparing SQLite triggers with POSTGRES_TRIGGERS once
the baseline was frozen, so a trigger a later migration created on SQLite went
unnoticed. The comparison now runs in both states, with advice that points at
the migration when the baseline is frozen.
This commit is contained in:
Maurice
2026-11-17 21:39:27 +01:00
parent 8c8cfb5d5d
commit aa77e21d4b
4 changed files with 94 additions and 22 deletions
+1
View File
@@ -292,6 +292,7 @@ jobs:
# lands after its cut it must match them exactly; after, it is frozen,
# its list of migrations is checked and the migrations after the cut are
# listed: lint:dialect holds their engineDdl and PARITY-PG their result.
# Either way every SQLite trigger needs its Postgres port.
run: cd server && npm run check:pg-baseline
server-lint-checks: