Current: MediaWiki 1.27.4 Upgrade to: MediaWiki 1.31.0
PHP 7.1.17 (fpm-fcgi) MariaDB 10.2.14 URL - localhost (test environment)
Running the maintenance script update.php produces a privilege error:
=
Turning off Content Handler DB fields for this part of upgrade. Adding ipb_id field to table ipblocks ...[06a6bcb5ba7a28f0640c1c8d] [no req] Wikimedia\Rdbms\DBQueryError from line 1457 of /var/www/html/w/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? Query: ALTER TABLE `mediawiki`.`ipblocks`
ADD ipb_auto tinyint NOT NULL default '0', ADD ipb_id int NOT NULL auto_increment, ADD PRIMARY KEY (ipb_id)
Function: Wikimedia\Rdbms\Database::sourceFile( /var/www/html/w/maintenance/archives/patch-ipblocks.sql ) Error: 1142 ALTER command denied to user 'wiki'@'localhost' for table 'ipblocks' (localhost)
Backtrace:
- 0 /var/www/html/w/includes/libs/rdbms/database/Database.php(1427): Wikimedia\Rdbms\Database->makeQueryException(string, integer, string, string)
- 1 /var/www/html/w/includes/libs/rdbms/database/Database.php(1200): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
- 2 /var/www/html/w/includes/libs/rdbms/database/Database.php(4194): Wikimedia\Rdbms\Database->query(string, string)
- 3 /var/www/html/w/includes/libs/rdbms/database/Database.php(4129): Wikimedia\Rdbms\Database->sourceStream(resource (closed), NULL, NULL, string, NULL)
- 4 /var/www/html/w/includes/installer/DatabaseUpdater.php(683): Wikimedia\Rdbms\Database->sourceFile(string)
- 5 /var/www/html/w/includes/installer/DatabaseUpdater.php(751): DatabaseUpdater->applyPatch(string, boolean, string)
- 6 /var/www/html/w/includes/installer/DatabaseUpdater.php(482): DatabaseUpdater->addField(string, string, string)
- 7 /var/www/html/w/includes/installer/DatabaseUpdater.php(446): DatabaseUpdater->runUpdates(array, boolean)
- 8 /var/www/html/w/maintenance/update.php(200): DatabaseUpdater->doUpdates(array)
- 9 /var/www/html/w/maintenance/doMaintenance.php(94): UpdateMediaWiki->execute()
- 10 /var/www/html/w/maintenance/update.php(245): require_once(string)
- 11 {main}
==
Running the update script as a database user with administrator privileges produces this error:
Function: Wikimedia\Rdbms\Database::sourceFile( /var/www/html/w/maintenance/archives/patch-ipblocks.sql ) Error: 1146 Table 'mediawiki.ipblocks' doesn't exist (localhost)
(same backtrace)
==
My database user account has "GRANT ALL PRIVILEGES ON `wiki`.* TO 'wiki'@'localhost'".
There are no errors when I run the update script from a version 1.31 clean install.
There are no errors when I run the update script from my current version 1.27.4.
I am blocked upgrading to version 1.31.0.
How can I debug this problem? I do not see any mention of this problem in Phabricator.