Jump to content

Topic on Project:Support desk

Upgrading MediaWiki from 1.27.1 to the Latest Version

6
Georgesanjeev (talkcontribs)

Hello, community!

I'm currently using MediaWiki version 1.27.1 and looking to upgrade to the latest version available. Could someone guide me through the steps involved in this process? Here are a few specific questions I have:

  1. Upgrade Steps: What are the recommended steps to upgrade from MediaWiki 1.27.1 to the latest stable version? I've tried the upgrade but it looks like there's been some MAJOR schema changes and it errors out asking for missing tables. Ive also tried going to the v1.28.0 but its giving me same error. Table 'user' not found. Are there any particular considerations or prerequisites I should be aware of? My next idea is to setup 1.42.1 with the default db and try and see if a schema compare will let me allow a data migration. but again
  2. Database Migration: Currently, my MediaWiki instance is using SQL Server and I've setup a MariaDB using the sql workbench migration feature. Few warnings about the Auto Increment being dropped but nothing major. I'm particularly worried about the schema changes between the two versions

Any help or guidance on these topics would be greatly appreciated! Thank you in advance.

Fokebox (talkcontribs)

Upgrade Path:

  • Direct upgrade to 1.42.1 from MediaWiki 1.33 or earlier versions is not supported
  • Upgrade to MediaWiki 1.35 before transitioning to MediaWiki 1.42 to prevent data loss
  • MediaWiki 1.35 is the oldest version compatible with a direct upgrade to MediaWiki 1.42
TheDJ (talkcontribs)
Georgesanjeev (talkcontribs)

The problem I have here is that, the db level changes between 1.27 and 1.35.

My new db is MYSQL and current one is SQL Server. I tried to setup 1.35 on the new server and import the data but apparently there are quite a few changes schema wise for the data migration to go through .


I aslo tried to setup 1.27.1 on a new server and run through the mediawiki installer but it always errors out with "Table 'mediawiki.cur' doesn't exist" which is strange considering from what Ive read its been "The cur table was used in older versions of MediaWiki wikis to store the current revision of a page"


So im stuck as to where I go from here

TheDJ (talkcontribs)

Yes, moving from a completely different database system, requires quite a bit of knowledge about SQL to pull off and will be a lot of manual labor.

You can find a full documentation about the history of all (mysql) tables via Manual:Database layout. You will probably want to peruse through all that in order to make it work. I would definitely setup a mysql 1.27 with a mysql setup first to do the SQL to MySQL data migration, before getting started on the actual data migration.

There is also the history of the entire mssql schema at https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/refs/heads/REL1_33/maintenance/mssql/

However note that already in 1.33 mssql had major broken parts and was lagging behind the other schema changes, so I would not use it to upgrade to the 1.33 schema. It and it's history may however help in figuring out the history of the schema and the differences with the mysql variant.

Georgesanjeev (talkcontribs)

So here is the process I find might be the best way to do it.

  1. Backup current mediawiki db from sql server
  2. Using MySql workbench migrate to new MySQL DB (Apparently workbench dropped all auto increments for the primary fields)
  3. Setup 1.35 on new server. Recognsies tables in db and runs upgrader. And the below error.

Error -

Making bot_passwords.bp_user into an unsigned int ...

An error occurred:

Cannot change column 'bp_user': used in a foreign key constraint 'FK__bot_passw__bp_us__2C3393D0'

Do i go about removing all the FKs it reports as errors and then readd them later on?

Reply to "Upgrading MediaWiki from 1.27.1 to the Latest Version"