Last modified: 2014-01-31 21:33:18 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T36925, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34925 - create maintenance script for Migration of text from archive table to text table
create maintenance script for Migration of text from archive table to text table
Status: ASSIGNED
Product: MediaWiki
Classification: Unclassified
Maintenance scripts (Other open bugs)
1.20.x
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Kevin Israel (PleaseStand)
:
Depends on:
Blocks: 31223
  Show dependency treegraph
 
Reported: 2012-03-03 10:31 UTC by db [inactive,noenotif]
Modified: 2014-01-31 21:33 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Code for migration of the fields archive.ar_text and archive.ar_flags from archive table to text table (744 bytes, patch)
2014-01-29 18:11 UTC, Pawan Seerwani
Details

Description db [inactive,noenotif] 2012-03-03 10:31:02 UTC
The table archive has a the old fields archive.ar_text/archive.ar_flags. Before removing that fields (bug 31223) a maintenance script is needed to move the text to the text table.

Calling Revision::newFromArchiveRow for each row with archive.ar_text_id IS NULL to extract the text with all flags.
But no idea how MediaWiki saves the text back to the right table and cleaning up the archive table, because we do not do undeletion (In that case Revision::insertOn does the work).
Comment 1 Pawan Seerwani 2014-01-28 21:59:00 UTC
I am willing to work on this. I am new to mediawiki, so can someone please explain me what is to be done here?
Comment 2 Andre Klapper 2014-01-29 11:38:13 UTC
Pawan: Comment 0 explains what needs to be done here. If something *specific* is unclear, please ask specific questions after you have found the code and taken a look at it to understand it.
Comment 3 Pawan Seerwani 2014-01-29 18:11:07 UTC
Created attachment 14409 [details]
Code for migration of the fields archive.ar_text and  archive.ar_flags from archive table to text table
Comment 4 Pawan Seerwani 2014-01-29 18:19:45 UTC
Comment on attachment 14409 [details]
Code for migration of the fields archive.ar_text and  archive.ar_flags from archive table to text table

As I understand, the archive.ar_text and archive.ar_flags  are to be migrated to text.old_text and text.old_flags

I have added the first version of patch for the migration.
Do comment on it. 

Further questions : 
1. Should I delete the corresponding fields of the migrated entries from the archives table.

Edit : 
I now realize that archive.ar_id should be migrated to text.old_id as well.I will do it in the next patch.
Comment 5 Andre Klapper 2014-01-30 10:42:42 UTC
Hi Pawan! Thanks for your attachment! It's not a patch though but a code file.

You are welcome to use Developer access
  https://www.mediawiki.org/wiki/Developer_access
to submit a patch as a Git branch directly into Gerrit:
  https://www.mediawiki.org/wiki/Git/Tutorial

Putting your branch in Git makes it easier to review it quickly. If you don't want to set up Git/Gerrit, you can also use https://tools.wmflabs.org/gerrit-patch-uploader/
Thanks again! We appreciate your contribution.
Comment 6 Gerrit Notification Bot 2014-01-31 03:01:40 UTC
Change 110503 had a related patch set uploaded by Gerrit Patch Uploader:
textMigration.php : Migration of text from archive table to text table

https://gerrit.wikimedia.org/r/110503
Comment 7 Kevin Israel (PleaseStand) 2014-01-31 21:33:18 UTC
Assigning this bug to myself, as I was already working on it (and at least at the moment, have more complete code).

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links