Page MenuHomePhabricator

Merge detached Phab and MediaWiki accounts with the same username in DB
Closed, DuplicatePublic

Description

SELECT a.username,a.source,a.uuid,b.uuid,b.username,b.source FROM identities AS a LEFT JOIN identities AS b ON a.username = b.username WHERE a.source = "phabricator" AND a.uuid != b.uuid AND b.source = "mediawiki" ORDER BY a.username;

Then check if that Phab name is really associated to the MediaWiki account with the same name (e.g. via API).
Then merge when matched, semi-automated by tweaking the output of SELECT a.uuid,b.uuid FROM identities AS a LEFT JOIN identities AS b ON a.username = b.username WHERE a.source = "phabricator" AND a.uuid != b.uuid AND b.source = "mediawiki" ORDER BY a.username;

Should be around 520 accounts.