mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-16 22:43:19 +00:00
Fix tokens table migration
This commit is contained in:
@@ -60,10 +60,19 @@ class patch_390alpha15a extends patchAbstract
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = 'INSERT INTO Tokens
|
$app['EM']->getConnection()->executeUpdate('
|
||||||
(value, user_id, type, data, created, updated, expiration)
|
INSERT INTO Tokens
|
||||||
(SELECT value, usr_id, type, datas, created_on, created_on, expire_on FROM tokens_backup)';
|
(
|
||||||
$appbox->get_connection()->exec($sql);
|
`value`, user_id, `type`, `data`,
|
||||||
|
created, updated, expiration
|
||||||
|
)
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
tb.`value`, tb.usr_id, tb.`type`, tb.datas,
|
||||||
|
tb.created_on, tb.created_on, tb.expire_on
|
||||||
|
FROM tokens_backup tb
|
||||||
|
INNER JOIN Users u ON (u.id = tb.usr_id)
|
||||||
|
)');
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user