Commit 7bd5524
authored
fix(db): deterministic per-file search_path in migration runner (#112)
Found by the wizard's fresh-project e2e: the pg_dump baseline empties
the session `search_path` (its own statements are fully qualified), and
because migration files share one connection, 0001's unqualified
`v2_entitlements` reference failed on a fresh project. Production never
executed the baseline (ledgered), so this only bites fresh installs.
One line in the runner: `SET LOCAL search_path = public, pg_catalog` at
the top of each per-file transaction — deterministic environment per
file, reverted at commit.
## Verification notes
- [x] `pnpm lint` / `pnpm typecheck` / `pnpm turbo build --force` /
`pnpm deadcode` / `pnpm architecture:check`
- Post-merge: wizard resume on the half-migrated fresh project (0000
ledgered, 0001-0003 pending) must complete 0001→0003 + target assertion
— the exact failed scenario.1 parent 13a8f2f commit 7bd5524
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
| |||
0 commit comments