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