Actual behavior
When upgrading to v2.5.39 we noticed an error with the SQL for db version 151.
The executed SQL query was: ALTER TABLE `galaxies` ADD `distribution` tinyint(4) NOT NULL DEFAULT 0; The returned error is: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'distribution' However, as this error is allowed, the update went through.
Even though the update went through the definition of the distribution column in the galaxies table remains to have a default value of NULL and not 0 as is implied by the ALTER TABLE statement above.
ALTER TABLE `galaxies` MODIFY `distribution` tinyint(4) NOT NULL DEFAULT 0;
The above sql fixes this.
Expected behavior
Use a modify statement if the column exists.
Steps to reproduce
Upgrade from a version prior to 2.5.39 to that version.
Check the update progress or the update_database logs.
Version
2.5.39
Operating System
Ubuntu
Operating System version
24.04
PHP version
8.3
Browser
No response
Browser version
No response
Relevant log output
Extra attachments
No response
Code of Conduct
Actual behavior
When upgrading to v2.5.39 we noticed an error with the SQL for db version 151.
The executed SQL query was: ALTER TABLE `galaxies` ADD `distribution` tinyint(4) NOT NULL DEFAULT 0; The returned error is: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'distribution' However, as this error is allowed, the update went through.Even though the update went through the definition of the distribution column in the galaxies table remains to have a default value of NULL and not 0 as is implied by the ALTER TABLE statement above.
ALTER TABLE `galaxies` MODIFY `distribution` tinyint(4) NOT NULL DEFAULT 0;The above sql fixes this.
Expected behavior
Use a modify statement if the column exists.
Steps to reproduce
Upgrade from a version prior to 2.5.39 to that version.
Check the update progress or the update_database logs.
Version
2.5.39
Operating System
Ubuntu
Operating System version
24.04
PHP version
8.3
Browser
No response
Browser version
No response
Relevant log output
Extra attachments
No response
Code of Conduct