fix(GRO-2672): use drizzle-kit migrate in reset.ts to bypass HWM bug
drizzle-orm's migrate() has a high-water-mark (HWM) bug: on a fresh DB, migration 0000 sets the watermark to 2026-03-17. Migrations 0001, 0003, 0010, 0011 have stale 2025-era `when` timestamps and are silently skipped. Migration 0003 (recurring_series) is critical -- its skip leaves `recurring_series`, `appointments.series_id`, and `appointments.series_index` missing. A downstream migration inside migrate()'s single Postgres transaction then fails, rolling back everything including 0000's `staff` and `services` tables. Replace the drizzle-orm migrate() call with `pnpm exec drizzle-kit migrate` (hash-based). drizzle-kit applies every unhashed migration regardless of `when` ordering, matching the K8s migrate Job exactly.
This commit is contained in:
+1
-145
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user