Repository navigation
Commit d0008a1
Report migration errors instead of silently dropping them
_applySQLUpdates() was meant to ignore only the errors you get when a
migration re-adds a column or key that is already there. Two of its four
checks were missing "=== false", so an error was reported only if its text
contained both "Multiple primary key defined" and "Duplicate key name",
which never happens. Every failed migration statement was dropped: the
installer and System Admin > Upgrade always reported success, and installs
could silently end up with a different schema (see the 012/033/050/051/056
fixes before this commit, all found this way). This is the "web2project
just swallows them" behaviour noted on issue #385.
- All four checks now use "=== false".
- Dropping an index or column that is already gone ("check that it
exists") is ignored too: the schema is already in the intended state,
and 012 does this 23 times on a fresh install.
- Each reported error starts with the migration file name.
A fresh install now completes with no errors, and a failing statement in a
new migration is listed on the upgrade page.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016CP89WVmGZ1VVCCZMS6ntN1 parent 5d50ab9 commit d0008a1
1 file changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
302 | 307 | | |
303 | 308 | | |
304 | 309 | | |
305 | | - | |
306 | | - | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
307 | 313 | | |
308 | | - | |
| 314 | + | |
309 | 315 | | |
310 | 316 | | |
311 | 317 | | |
| |||
0 commit comments