Commit 88a765a
authored
fix(db): paren-insensitive constraint-drift comparison (#113)
Found by the fresh-project e2e's final target assertion:
`pg_get_constraintdef` prints AND-chains left-associated on PG 17.4
(where the pinned definitions were dumped) but flattened on 17.6 (fresh
Supabase projects today) — semantically identical, textually different,
so the drift check false-fired. Also future-proofs production's own
eventual minor upgrade.
Both sides of the comparison are now parenthesis-stripped;
operator/literal/regex weakening still surfaces, which is what the check
exists to catch.
## Verification notes
- [x] `pnpm lint` / `pnpm typecheck` / `pnpm turbo build --force` /
`pnpm deadcode` / `pnpm architecture:check`
- Post-merge: wizard resume must clear the target assertion on the fresh
17.6 project (migrations 0000-0003 already ledgered there) and proceed
to provisioning + probes.1 parent 7bd5524 commit 88a765a
1 file changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
185 | 193 | | |
186 | 194 | | |
187 | 195 | | |
| |||
261 | 269 | | |
262 | 270 | | |
263 | 271 | | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
0 commit comments