Commit 4485116
committed
fix(migrations): revert 0014 idempotency guard
The guard was both unreachable and unsafe. For platforms.id to exist on
a rerun, the first attempt must have already run the atomic ADD COLUMN
id ... PRIMARY KEY, which means it passed the unguarded
drop_constraint("fk_platform_roms") at the top of upgrade(). That FK
drop has no IF EXISTS, so any rerun fails there before reaching the
guard. And if it were reachable, the preceding primary-key drop would
leave id unkeyed once the ADD COLUMN was skipped.
Keep the genuinely correct fixes (0084, 0033); leave 0014 as-is.
Generated-By: PostHog Code
Task-Id: 87d70ab6-f915-48c0-afa7-55064c97d1a51 parent 8ce8449 commit 4485116
1 file changed
Lines changed: 7 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
183 | 178 | | |
184 | 179 | | |
185 | 180 | | |
| |||
0 commit comments