@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_email (
2 `id` int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
3 userPHID varchar(64) collate utf8_bin NOT NULL,
4 address varchar(128) collate utf8_general_ci NOT NULL,
5 isVerified bool not null default 0,
6 isPrimary bool not null default 0,
7 verificationCode varchar(64) collate utf8_bin,
8 dateCreated int unsigned not null,
9 dateModified int unsigned not null,
10 KEY (userPHID, isPrimary),
11 UNIQUE KEY (address)
12) ENGINE=InnoDB DEFAULT CHARSET=utf8;