Page MenuHomePhabricator

1.32.3 to 1.33.0 database update failure: "no such column: oi_description_id"
Closed, DeclinedPublic

Description

The following error appears in my MediaWiki setup, when I try to upgrade using maintenance/update.php from 1.32.3 to 1.33.0:

MediaWiki 1.33.0 Updater

Your composer.lock file is up to date with current dependencies!
Going to run database updates for XXXXXXXXXXX
Using SQLite file: 'XXXXXXXXXXX'
Depending on the size of your database this may take a while!
Abort with control-c in the next five seconds (skip this countdown with --quick) ... 0
Turning off Content Handler DB fields for this part of upgrade.
...have ss_active_users field in site_stats table.
...ss_active_users user count set...
...have ipb_allow_usertalk field in ipblocks table.
...have initial indexes
...change_tag table already exists.
...user_properties table already exists.
...log_search table already exists.
...have log_user_text field in logging table.
...l10n_cache table already exists.
...ct_rc_id key doesn't exist.
...have rd_interwiki field in redirect table.
...fulltext search table appears to be in order.
...iwlinks table already exists.
...index iwl_prefix_title_from already set on iwlinks table.
...have ul_value field in updatelog table.
...have iw_api field in interwiki table.
...iwl_prefix key doesn't exist.
...have cl_collation field in categorylinks table.
...module_deps table already exists.
...ar_page_revid key doesn't exist.
...skipping index ar_revid because index ar_revid_uniq already set on archive table.
...index user_email already set on user table.
...uploadstash table already exists.
...user_former_groups table already exists.
...batch conversion of user_options: nothing to migrate. done.
...user table does not contain user_options field.
...have rev_sha1 field in revision table.
...have ar_sha1 field in archive table.
...index page_redirect_namespace_len already set on page table.
...have us_chunk_inx field in uploadstash table.
...have job_timestamp field in job table.
...index page_user_timestamp already set on revision table.
...have ipb_parent_block_id field in ipblocks table.
...index ipb_parent_block_id already set on ipblocks table.
...category table does not contain cat_hidden field.
...have rev_content_format field in revision table.
...have rev_content_model field in revision table.
...have ar_content_format field in archive table.
...have ar_content_model field in archive table.
...have page_content_model field in page table.
Content Handler DB fields should be usable now.
...site_stats table does not contain ss_admins field.
...recentchanges table does not contain rc_moved_to_title field.
...sites table already exists.
...have fa_sha1 field in filearchive table.
...have job_token field in job table.
...have job_attempts field in job table.
...have us_props field in uploadstash table.
...ug_group in table user_groups already modified by patch patch-ug_group-length-increase-255.sql.
...ufg_group in table user_former_groups already modified by patch patch-ufg_group-length-increase-255.sql.
...index pp_propname_page already set on page_props table.
...index img_media_mime already set on image table.
...index iwl_prefix_from_title already set on iwlinks table.
...have ar_id field in archive table.
...have el_id field in externallinks table.
...have rc_source field in recentchanges table.
...index log_user_text_type_time already set on logging table.
...index log_user_text_time already set on logging table.
...have page_links_updated field in page table.
...have user_password_expires field in user table.
...have pp_sortkey field in page_props table.
...recentchanges table does not contain rc_cur_time field.
...index wl_user_notificationtimestamp already set on watchlist table.
...have page_lang field in page table.
...have pl_from_namespace field in pagelinks table.
...have tl_from_namespace field in templatelinks table.
...have il_from_namespace field in imagelinks table.
...hitcounter doesn't exist.
...site_stats table does not contain ss_total_views field.
...page table does not contain page_counter field.
...fa_deleted_reason in table filearchive already modified by patch patch-editsummary-length.sql.
...msg_resource_links doesn't exist.
...msg_resource doesn't exist.
...bot_passwords table already exists.
...have wl_id field in watchlist table.
...cl_collation key doesn't exist.
...index cl_collation_ext already set on categorylinks table.
...collations up-to-date.
...index rc_name_type_patrolled_timestamp already set on recentchanges table.
...have ct_id field in change_tag table.
...have el_index_60 field in externallinks table.
...have ug_expiry field in user_groups table.
...index img_user_timestamp already set on image table.
...img_media_type in table image already modified by patch patch-add-3d.sql.
...ip_changes table already exists.
...skipping: index cl_from doesn't exist.
...skipping: index tl_from doesn't exist.
...skipping: index pl_from doesn't exist.
...skipping: index old_id doesn't exist.
...skipping: index il_from doesn't exist.
...skipping: index iwl_from doesn't exist.
...skipping: index ll_from doesn't exist.
...skipping: index ls_field_val doesn't exist.
...skipping: index md_module_skin doesn't exist.
...skipping: index keyname doesn't exist.
...skipping: index qci_type doesn't exist.
...skipping: index ss_row_id doesn't exist.
...skipping: index ufg_user_group doesn't exist.
...skipping: index user_properties_user_property doesn't exist.
...comment table already exists.
...have img_description_id field in image table.
...have fa_description_id field in filearchive table.
Migrating comments to the 'comments' table, printing progress markers. For large
databases, you may want to hit Ctrl-C and do this manually with
maintenance/migrateComments.php.
Beginning migration of revision.rev_comment to revision_comment_temp.revcomment_comment_id
Completed migration, updated 0 row(s) with 0 new comment(s)
Beginning migration of archive.ar_comment to archive.ar_comment_id
Completed migration, updated 0 row(s) with 0 new comment(s)
Beginning migration of ipblocks.ipb_reason to ipblocks.ipb_reason_id
Completed migration, updated 0 row(s) with 0 new comment(s)
Beginning migration of image.img_description to image.img_description_id
Completed migration, updated 0 row(s) with 0 new comment(s)
Beginning migration of oldimage.oi_description to oldimage.oi_description_id
[0ef0686664a5f21824fe322d] [no req]   Wikimedia\Rdbms\DBQueryError from line 1587 of /XXXXXXXXXX/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: SELECT  oi_name,oi_timestamp,oi_description  FROM oldimage    WHERE oi_description_id = '0' AND (1=1)  ORDER BY oi_name,oi_timestamp LIMIT 100  
Function: MigrateComments::migrate
Error: 1 no such column: oi_description_id

Backtrace:
#0 /XXXXXXXXXX/w/includes/libs/rdbms/database/Database.php(1556): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)
#1 /XXXXXXXXXX/w/includes/libs/rdbms/database/Database.php(1274): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#2 /XXXXXXXXXX/w/includes/libs/rdbms/database/Database.php(1784): Wikimedia\Rdbms\Database->query(string, string)
#3 /XXXXXXXXXX/w/maintenance/migrateComments.php(159): Wikimedia\Rdbms\Database->select(string, array, array, string, array)
#4 /XXXXXXXXXX/w/maintenance/migrateComments.php(56): MigrateComments->migrate(string, array, string)
#5 /XXXXXXXXXX/w/maintenance/Maintenance.php(1719): MigrateComments->doDBUpdates()
#6 /XXXXXXXXXX/w/includes/installer/DatabaseUpdater.php(1279): LoggedUpdateMaintenance->execute()
#7 /XXXXXXXXXX/w/includes/installer/DatabaseUpdater.php(489): DatabaseUpdater->migrateComments()
#8 /XXXXXXXXXX/w/includes/installer/DatabaseUpdater.php(453): DatabaseUpdater->runUpdates(array, boolean)
#9 /XXXXXXXXXX/w/maintenance/update.php(203): DatabaseUpdater->doUpdates(array)
#10 /XXXXXXXXXX/w/maintenance/doMaintenance.php(96): UpdateMediaWiki->execute()
#11 /XXXXXXXXXX/w/maintenance/update.php(266): require_once(string)

The wiki is then in a completely unusable state.

The problem looks like a reoccurence of the following bug report, which is supposed to be fixed in the current stable version 1.33.0: https://phabricator.wikimedia.org/T211893

My PHP version is 7.3.4-2 (fpm-fcgi), database backend is SQLite 3.27.2.

Event Timeline

Aklapper renamed this task from 1.32.3 to 1.33.0 database update failure related to oi_description_id to 1.32.3 to 1.33.0 database update failure: "no such column: oi_description_id".Jul 24 2019, 8:34 PM