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,
|
|
|
|
oauthProvider varchar(255) not null,
|
|
|
|
oauthUID varchar(255) not null,
|
|
|
|
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;
|
|
|
|
|
2012-04-30 16:53:53 +02:00
|
|
|
alter table {$NAMESPACE}_user.user drop facebookUID;
|