2012-04-30 07:53:53 -07:00
|
|
|
create table {$NAMESPACE}_user.user_oauthinfo (
|
2011-02-20 22:47:56 -08:00
|
|
|
id int unsigned not null auto_increment primary key,
|
|
|
|
userID int unsigned not null,
|
2014-10-29 15:49:29 -07:00
|
|
|
oauthProvider varchar(255) COLLATE `binary` not null,
|
|
|
|
oauthUID varchar(255) COLLATE `binary` not null,
|
2011-02-20 22:47:56 -08:00
|
|
|
unique key (userID, oauthProvider),
|
|
|
|
unique key (oauthProvider, oauthUID),
|
|
|
|
dateCreated int unsigned not null,
|
|
|
|
dateModified int unsigned not null
|
|
|
|
);
|
|
|
|
|
2012-04-30 07:53:53 -07:00
|
|
|
insert into {$NAMESPACE}_user.user_oauthinfo
|
2011-02-20 22:47:56 -08:00
|
|
|
(userID, oauthProvider, oauthUID, dateCreated, dateModified)
|
|
|
|
SELECT id, 'facebook', facebookUID, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()
|
2012-04-30 07:53:53 -07:00
|
|
|
FROM {$NAMESPACE}_user.user
|
2011-02-20 22:47:56 -08:00
|
|
|
WHERE facebookUID is not null;
|
|
|
|
|
2014-02-26 12:44:58 -08:00
|
|
|
alter table {$NAMESPACE}_user.user drop facebookUID;
|