mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-20 11:06:06 +00:00
5503db4883
--check migrated a temporary SQLite database twice: once inside the generation and again to read the triggers for the port check. The generation now returns the triggers it already read, so a check is one migration. main is split into writeMode and checkMode, and the frozen-or-not decision lives in one place, checkBaseline. A baseline whose `through` is the newest migration must match the entities and port every SQLite trigger; a baseline frozen behind a newer migration is only checked by its manifest. The old code made the same decision twice, once for the match and once for the triggers, and the two could drift apart. The migrated-database read is split into listing the objects and reading them, so the temporary file is removed in one place. Manifest parsing uses a type guard, isBaselineManifest, instead of casts after a check, and PGBASE-004 pins what it refuses.