You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[2.1]: Upgrader fails updating validation code field #9894
I took a peek and the rest of the column definition was changed as well (nullable, default), not sure that was deliberate.
Not that when attributes are unspecified on an ALTER TABLE ... CHANGE ..., the MySQL default is used, not the prior value...
If you look at other column changes, you'll see that everything is specified, to avoid clobbering your column definition.
The problem was the change to increase the size of the validation_code. It needs a few things - mainly, it needs to look like all other ALTER TABLE ... CHANGE ... entries you'll see throughout the .sql file.
So, to be specific - gotta add the nullable & default attributes, and put a semicolon at the end.
I'm not sure WHY it's failing... But adding the semicolon makes it work.
My initial suspicion is that one of the trims is killing it, either by removing the last char or leaving the newline intact, etc. Nothing in any logs. Not even when enabling the mysql general log.
Running via browser, the script just fails & leaves you hanging, & the validation_code remains 10 chars:
Running via command line, an unhelpful error is reported (highlighted below), and it oddly continues & completes, but validation_code is still 10 chars:
See attached PR. I know I checked this, so its possible I mismerged it when I initially tested this. One of the annoying things about having to move our upgrade files to the forum root is I got to remember to put them back into other to get them to upload. So glad we changed this for 3.0 and that we also changed the upgrader logic to use more PHP driven logic and let the API figure out the query is we shouldn't have stuff like this happen.
Activity
jdarwood007 commentedon Nov 15, 2026
The last 2 changes from yesterday where misspelling fixes for the UTF8 upgrades. How would that break things?
sbulen commentedon Nov 15, 2026
The problem was the change to increase the size of the validation_code. It needs a few things - mainly, it needs to look like all other ALTER TABLE ... CHANGE ... entries you'll see throughout the .sql file.
So, to be specific - gotta add the nullable & default attributes, and put a semicolon at the end.
And test... It really helps to run an upgrade.
I haven't looked at the pg change.
jdarwood007 commentedon Nov 15, 2026
Funny enough my testing accepts it.
But yea we can add
NOT NULL DEFAULT '';to the end. The PG change should be fine, it matches the syntax of a earlier query.sbulen commentedon Nov 15, 2026
I'm not sure WHY it's failing... But adding the semicolon makes it work.
My initial suspicion is that one of the trims is killing it, either by removing the last char or leaving the newline intact, etc. Nothing in any logs. Not even when enabling the mysql general log.
Running via browser, the script just fails & leaves you hanging, & the validation_code remains 10 chars:
Running via command line, an unhelpful error is reported (highlighted below), and it oddly continues & completes, but validation_code is still 10 chars:
jdarwood007 commentedon Nov 15, 2026
See attached PR. I know I checked this, so its possible I mismerged it when I initially tested this. One of the annoying things about having to move our upgrade files to the forum root is I got to remember to put them back into other to get them to upload. So glad we changed this for 3.0 and that we also changed the upgrader logic to use more PHP driven logic and let the API figure out the query is we shouldn't have stuff like this happen.
I can't get the error on PG.
sbulen commentedon Nov 19, 2026
I think this was fixed by #9896
I don't think there's a 3.0 version coming the way it works now.
jdarwood007 commentedon Nov 20, 2026
3.0 uses PHP to build the SQL via a standardized API. If it was broke, it would be broken for a lot of things (in theory).