@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
phorge
phabricator
1create table {$NAMESPACE}_user.user_oauthinfo (
2 id int unsigned not null auto_increment primary key,
3 userID int unsigned not null,
4 oauthProvider varchar(255) COLLATE `binary` not null,
5 oauthUID varchar(255) COLLATE `binary` not null,
6 unique key (userID, oauthProvider),
7 unique key (oauthProvider, oauthUID),
8 dateCreated int unsigned not null,
9 dateModified int unsigned not null
10);
11
12insert into {$NAMESPACE}_user.user_oauthinfo
13 (userID, oauthProvider, oauthUID, dateCreated, dateModified)
14 SELECT id, 'facebook', facebookUID, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()
15 FROM {$NAMESPACE}_user.user
16 WHERE facebookUID is not null;
17
18alter table {$NAMESPACE}_user.user drop facebookUID;