mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-20 11:06:06 +00:00
e6f4f7a5f3
createFromBaseline created the migration history's table through MikroORM's storage before, and outside, the transaction that runs the baseline. Without a master transaction MikroORM commits that table on its own, so a first boot that failed in the baseline (a server without ICU, a timeout, a dropped connection) left an empty mikro_orm_migrations behind. The next start with RESTORE_FROM_BACKUP took that for a database in use, skipped the restore with a warning and brought up an empty instance, after which the restore never ran. The table is now created on the baseline's own transaction, so a failed first boot leaves the database empty. The boot restore also treats a lone migration history that records nothing as no database, which a restore clears anyway; any other answer keeps it, so the check fails closed. Database-Postgres says both.