Page MenuHomePhabricator

Error: 1146 Table 'valid_tag' doesn't exist when upgrading from an ancient MediaWiki version
Closed, ResolvedPublic

Description

When upgrading from an ancient MediaWiki version (1.12) the update.php script fails with the error:

An error occurred:
A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?
Query: SELECT  vt_tag AS `value`  FROM `valid_tag`     
Function: PopulateChangeTagDef::setUserDefinedTags
Error: 1146 Table 'wikidb.valid_tag' doesn't exist (localhost)

The valid_tag table was added in 1.15 and removed in 1.33: https://www.mediawiki.org/wiki/Manual:Valid_tag_table

Apparently, a script is running to migrate the data from that table to other tables before removing it, but that table doesn't exist in the first place. This means installations upgrading from a version before 1.15 will fail.

Reports of this error in the Support Desk:

Event Timeline

Ciencia_Al_Poder renamed this task from Error: 1146 Table 'wikidb.valid_tag' doesn't exist when upgrading from an ancient MediaWiki version to Error: 1146 Table 'valid_tag' doesn't exist when upgrading from an ancient MediaWiki version.Aug 12 2019, 9:40 AM
Ladsgroup triaged this task as Lowest priority.Aug 12 2019, 11:04 AM

1.12 was released in February 2009, more than 10 years ago. Upgrading in one go from that version to 1.33 is bound to have issues. You can upgrade from 1.12 to 1.16 first and then upgrade to 1.33. That would fix this issue.

Change 530173 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/core@master] maintenance/populateChangeTagDef.php: Handle missing valid_tags table

https://gerrit.wikimedia.org/r/530173

Change 530173 merged by jenkins-bot:
[mediawiki/core@master] maintenance/populateChangeTagDef.php: Handle missing valid_tags table

https://gerrit.wikimedia.org/r/530173

Anomie claimed this task.

Change 530325 had a related patch set uploaded (by Jforrester; owner: Anomie):
[mediawiki/core@REL1_33] maintenance/populateChangeTagDef.php: Handle missing valid_tags table

https://gerrit.wikimedia.org/r/530325

Change 530325 merged by jenkins-bot:
[mediawiki/core@REL1_33] maintenance/populateChangeTagDef.php: Handle missing valid_tags table

https://gerrit.wikimedia.org/r/530325