Commit 5bccc83
fix: correct constraint name in migration 040 upgrade/downgrade
Migration 040 tried to drop `generations_match_id_fkey`, but on prod
(and any DB upgrading through 039 for the first time) the constraint is
still named `fk_generations_match_id_matches` — the original name from
migration 025 that 039 drops and recreates under the same name.
The mismatch happened because the previous fix (08baebc) queried the dev
DB to resolve `None` constraint names, but dev was already at head, so
the names reflected the post-040 state rather than the pre-040 state.
Fix: use the actual constraint name that exists after 039 runs
(`fk_generations_match_id_matches`) in both upgrade() drop and
downgrade() create, so the migration chain is consistent end-to-end.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent b803c71 commit 5bccc83
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
0 commit comments