mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-06 18:54:17 +00:00
c9c40b8a0b
reseatBookedNights (legacy step 242) was never invoked from any shipped MikroORM migration -- only from the retired db/migrations.ts array -- so an install upgrading through the numbered chain never got the one-time reorder. Adds Migration20200101040300, which calls the frozen function through the native better-sqlite3 handle so it runs inside the migration's own transaction. orm-driver.ts's BoundSqliteConnection now also captures that handle onto the field SqliteConnection.getNativeClient() reads, which its createKyselyDialect() override previously left unset -- needed for this migration (and any future one) to reach it in production, not just under the bare test driver. RESEAT-009 moves off the legacy createTables+runMigrations builder onto the real Migrator via tests/helpers/migration-step.ts, plus a new fresh-install guard (RESEAT-011).