I am trying to upgrade a wiki family of 2 wikis from 1.32.0 to 1.33: https://develop.consumerium.org/wiki/ and https://test.consumerium.org/wiki/.
Duesen suggested to me to make a ticket of this issue.
The development wiki is the "important" wiki and the test wiki is not of high significance.
The test wiki uses the following shared tables from the development wiki:
$wgSharedDB = 'mediawiki_developwiki'; $wgSharedTables[] = 'ipblocks'; $wgSharedTables[] = 'user_groups'; $wgSharedTables[] = 'interwiki';
Before attempting to upgrade, I commented the above lines out from the LocalSettings.php of the test wiki and passed the server name by exporting $SERVER_NAME
Upgrade of the main wiki (development) runs fine, but trying to upgrade the test wiki it complains of finding a different database structure, than the one it expects.
I think I have narrowed it down that the problem arises when the updater runs 'php maintenance/migrateActors.php' and here is the error message produced by migrateActors.php:
$ php maintenance/migrateActors.php
Creating actor entries for all registered users
... 1 - 1
Completed actor creation, added 0 new actor(s)
Beginning migration of revision.rev_user and revision.rev_user_text to revision_actor_temp.revactor_actor
User name "Jukeboksi" is usable, cannot create an anonymous actor for it. Run maintenance/cleanupUsersWithNoId.php to fix this situation.
... rev_id=62
Completed migration, updated 0 row(s) with 0 new actor(s), 41 error(s)
Beginning migration of archive.ar_user and archive.ar_user_text to archive.ar_actor
User name "Jukeboksi" is usable, cannot create an anonymous actor for it. Run maintenance/cleanupUsersWithNoId.php to fix this situation.
... ar_id=1
Completed migration, updated 0 row(s) with 0 new actor(s), 1 error(s)
Beginning migration of ipblocks.ipb_by and ipblocks.ipb_by_text to ipblocks.ipb_by_actor
[729843f9b05172a7b38a2ff9] [no req] Wikimedia\Rdbms\DBQueryError from line 1587 of /var/www/consumerium.org/develop/mw-1.33/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: SELECT ipb_id,ipb_by,ipb_by_text,CASE WHEN ipb_by = 0 OR ipb_by IS NULL THEN (SELECT actor_id FROM actor WHERE (ipb_by_text = actor_name) ) ELSE (SELECT actor_id FROM actor WHERE (ipb_by = actor_user) ) END AS actor_id FROM ipblocks WHERE ipb_by_actor = '0' AND (1=1) ORDER BY ipb_id LIMIT 100
Function: MigrateActors::migrate
Error: 1054 Unknown column 'ipb_by_actor' in 'where clause' (localhost)
Backtrace:
#0 /var/www/consumerium.org/develop/mw-1.33/includes/libs/rdbms/database/Database.php(1556): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)
#1 /var/www/consumerium.org/develop/mw-1.33/includes/libs/rdbms/database/Database.php(1274): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#2 /var/www/consumerium.org/develop/mw-1.33/includes/libs/rdbms/database/Database.php(1784): Wikimedia\Rdbms\Database->query(string, string)
#3 /var/www/consumerium.org/develop/mw-1.33/maintenance/includes/MigrateActors.php(295): Wikimedia\Rdbms\Database->select(string, array, array, string, array)
#4 /var/www/consumerium.org/develop/mw-1.33/maintenance/includes/MigrateActors.php(115): MigrateActors->migrate(string, array, string, string, string)
#5 /var/www/consumerium.org/develop/mw-1.33/maintenance/Maintenance.php(1719): MigrateActors->doDBUpdates()
#6 /var/www/consumerium.org/develop/mw-1.33/maintenance/doMaintenance.php(96): LoggedUpdateMaintenance->execute()
#7 /var/www/consumerium.org/develop/mw-1.33/maintenance/migrateActors.php(27): require_once(string)
#8 {main}
Jukeboksi is my username on both of the wikis. The test wiki has always shared these tables from the main wiki.
This SQL is so complicated that I understand it only partially, and it seems that the situation is due to some error on my part in a previous upgrade of the wiki family. It is quite possible that I unwittingly broke the wiki family with a previous upgrade (to 1.32.0), as I did not realize right away to comment out the shared tables.
I uploaded the database structures of the development wiki and the test wiki here.
Let me know if any other information would be useful and I will try to deliver ASAP. Cheers.