And run it in beta cluster. Then compare to make sure the data is migrated properly.
Description
Details
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| Add migrateFileTables.php | mediawiki/core | master | +429 -0 |
| Status | Subtype | Assigned | Task | |
|---|---|---|---|---|
| · · · | ||||
| Open | Ladsgroup | T28741 Migrate file tables to a modern layout (image/oldimage; file/filerevision; add primary keys) | ||
| Resolved | Ladsgroup | T383492 Write the migration script | ||
| · · · |
Event Timeline
Change #1111724 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):
[mediawiki/core@master] Add migrateFileTables.php
The script works locally. Only thing I need to fix (which is not really blocking this) is to figure out what to do with renames. Imagine File:Z.png exists, the script is slowly chipping away at file (ordered by img_name) and is currently doing E.jpg (so A to E is done but onwards is not), at this moment, someone renames Z.png to A.png, that means my script will basically ignore that file. Easiest solution would be to make file renames trigger a full recheck and rebuild of file and filerevision entries. That shouldn't be too hard to implement.
Change #1111724 merged by jenkins-bot:
[mediawiki/core@master] Add migrateFileTables.php
Ran it in enwiki in beta cluster, worked just fine. Took less than ten minutes to migrate 10K files which gives a month or so for commons. The total size of the tables are 24MB while old tables were 16MB which is a bit of increase but not too bad (and it would be lower in production I think). For renames, I will simply get the list of renamed files and run the script on them. This is done.