mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-20 11:06:06 +00:00
d498fe2bea
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.