Maintenance script to clean up mismatched user names in ipblocks
authorBrad Jorsch <bjorsch@wikimedia.org>
Mon, 27 Oct 2014 14:29:55 +0000 (10:29 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Mon, 27 Oct 2014 14:40:02 +0000 (10:40 -0400)
commit0a32c179e49085dd6b6c0ef3111497229f4fa10f
tree04fb8aee23162c4a2c2e2669238ae46d9faf6d99
parent5755a294978c5a55a2058f661762353d6935dfab
Maintenance script to clean up mismatched user names in ipblocks

For blocks with ipb_user non-zero, the ipb_address field is supposed to
match user_name. But due to various bugs over the years, this doesn't
hold true.

Due to those old bugs, we also have rows with the same ipb_user (and
ipb_auto and ipb_anon_only, since those only apply to IP blocks) but
different ipb_address. Those also need cleaning up, both to prevent
a unique constraint violation and to stop errors in ApiQueryAllUsers.

Bug: 34014
Bug: 72560
Change-Id: I519078ec011dbd0043811a78c3f913792a4df7fe
maintenance/cleanupBlocks.php [new file with mode: 0644]