Files
TREK/server
Isaias Tavares d498fe2bea refactor(db): read the Postgres bootstrap as inspect, create or verify, migrate
bootstrapPostgresSchema did three jobs in one 35-line body, and the safety
net's label came from an `as string` cast on the last executed migration.

It now reads in three steps: inspect what the database holds, then create
the schema from the baseline (createFromBaseline) or verify the recorded
history against this build (refuseNewerHistory), then run the pending
migrations. The label is read from the list with `.at(-1)` and only when
there is one: a database the baseline just created has no history to label
its copy by, which is the case the old `created` flag tested.

The deps keep baseline as a thunk on purpose: the committed baseline is read
only on the create path, so a database already at its head never touches it.
2026-11-05 00:23:08 -03:00
..
2026-10-06 19:27:30 +02:00
2026-05-06 21:38:40 +02:00
2026-06-16 22:22:45 +02:00
2026-06-16 22:22:45 +02:00
2026-08-27 13:22:39 +02:00
2026-08-27 13:22:39 +02:00