Page MenuHomePhabricator

Create a rev_user and rev_user_text associating maintenance script
Closed, DeclinedPublic

Description

This is not a top priority or anything but it would be interesting to have a maintenance script that automatically associates all rev_user IDs with rev_user_text.
For example if an import is done (such as XML) or just an import without the user table, this would help new users that register to be associated with the old edits under their name.

It would imitate the query
UPDATE revision SET rev_user = '1' WHERE rev_user_text = 'Example' and rev_user = 0

Related Objects

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 28 2017, 6:46 PM
Reception123 added a comment.EditedAug 27 2017, 6:37 PM

https://raw.githubusercontent.com/miraheze/MirahezeMagic/master/maintenance/fixUserIdRevision.php should work. Do you think it could be integrated into MediaWiki maintenance scripts? I see no issue in just keeping it local, but I'm thinking it might be useful for other users too.

https://raw.githubusercontent.com/miraheze/MirahezeMagic/master/maintenance/fixUserIdRevision.php should work. Do you think it could be integrated into MediaWiki maintenance scripts?

It doesn't fix other tables like logging, file, oldimage, archive...

But it may be good to integrate it as a maintenance script. We already have a lot of WMF-specific stuff there anyway.

Ok, I'll look to see if those can get added, and will submit a patch later.

You may take a look at Extension:Renameuser

Thank you, good idea! :)

Should this be declined, given that the fields were combined in T161671: Compacting the revision table?

Should this be declined, given that the fields were combined in T161671: Compacting the revision table?

This is what happens when bug reports are written giving the solution instead of explaining the actual problem :)

DannyS712 closed this task as Declined.Nov 22 2019, 5:35 PM

Per above