Note: This is very similar to T314779. But seems like this issue is different. (reverse issue?)
Steps to replicate the issue (include links if applicable):
So this caused on during testing update from some-what-backed-up-on-years-ago mediawiki 1.35 instance to mediawiki 1.39-rc.1. Sorry that i don't know what causes it.
- Run update.php on MW 1.39-rc.1 with Echo REL1_39 branch from Mediawiki 1.35 Instance DB.
What happens?:
Wikimedia\Rdbms\DBQueryError from line 1618 of /srv/wiki/w/includes/libs/rdbms/database/Database.php: Error 1091: Can't DROP FOREIGN KEY `echo_push_subscription_ibfk_2`; check that it exists Function: Wikimedia\Rdbms\Database::sourceFile( /srv/wiki/w/extensions/Echo/sql/mysql/patch-cleanup-push_subscription-foreign-keys-indexes.sql ) Query: ALTER TABLE `echo_push_subscription` DROP FOREIGN KEY `echo_push_subscription_ibfk_2` #0 /srv/wiki/w/includes/libs/rdbms/database/Database.php(1602): Wikimedia\Rdbms\Database->getQueryException() #1 /srv/wiki/w/includes/libs/rdbms/database/Database.php(1576): Wikimedia\Rdbms\Database->getQueryExceptionAndLog() #2 /srv/wiki/w/includes/libs/rdbms/database/Database.php(952): Wikimedia\Rdbms\Database->reportQueryError() #3 /srv/wiki/w/includes/libs/rdbms/database/Database.php(3299): Wikimedia\Rdbms\Database->query() #4 /srv/wiki/w/includes/libs/rdbms/database/Database.php(3238): Wikimedia\Rdbms\Database->sourceStream() #5 /srv/wiki/w/includes/libs/rdbms/database/DBConnRef.php(103): Wikimedia\Rdbms\Database->sourceFile() #6 /srv/wiki/w/includes/libs/rdbms/database/DBConnRef.php(806): Wikimedia\Rdbms\DBConnRef->__call() #7 /srv/wiki/w/includes/installer/DatabaseUpdater.php(718): Wikimedia\Rdbms\DBConnRef->sourceFile() #8 /srv/wiki/w/includes/installer/DatabaseUpdater.php(819): DatabaseUpdater->applyPatch() #9 /srv/wiki/w/includes/installer/DatabaseUpdater.php(547): DatabaseUpdater->addIndex() #10 /srv/wiki/w/includes/installer/DatabaseUpdater.php(515): DatabaseUpdater->runUpdates() #11 /srv/wiki/w/maintenance/update.php(202): DatabaseUpdater->doUpdates() #12 /srv/wiki/w/maintenance/includes/MaintenanceRunner.php(309): UpdateMediaWiki->execute() #13 /srv/wiki/w/maintenance/doMaintenance.php(85): MediaWiki\Maintenance\MaintenanceRunner->run() #14 /srv/wiki/w/maintenance/update.php(312): require_once('...') #15 {main}
What should have happened instead?:
Run smoothly.
Software version (skip for WMF-hosted wikis like Wikipedia):
Mediawiki 1.39-rc.1 MariaDB 10.9.3 PHP 8.0.25 (Alpine v3.16)
Other information (browser name/version, screenshots, etc.):