Skip to content

Instantly share code, notes, and snippets.

@sarumpaet
sarumpaet / mediawiki_merge_actor_tables.php
Created May 31, 2022 22:46
consolidate separate actor tables of two MediaWikis with shared user table into one actor table
<?php
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
// Consolidate separate actor tables of two MediaWikis
// with a shared user table into one actor table.
// This addresses bugs https://phabricator.wikimedia.org/T299766
// and https://phabricator.wikimedia.org/T243276
// You will probably want to check if replace_actor_id() covers