Fix user_temporary_token table

This commit is contained in:
Bryan Ashby 2019-06-11 19:54:57 -06:00
parent f8788d56d6
commit 18eecb6223
No known key found for this signature in database
GPG Key ID: B49EB437951D2542
1 changed files with 2 additions and 2 deletions

View File

@ -212,9 +212,9 @@ const DB_INIT_TABLE = {
`CREATE TABLE IF NOT EXISTS user_temporary_token ( `CREATE TABLE IF NOT EXISTS user_temporary_token (
user_id INTEGER NOT NULL, user_id INTEGER NOT NULL,
token VARCHAR NOT NULL, token VARCHAR NOT NULL,
token_type VARCHAR NOT NULL,
timestamp DATETIME NOT NULL, timestamp DATETIME NOT NULL,
purpose VARCHAR NOT NULL, UNIQUE(user_id, token_type),
UNIQUE(user_id, token),
FOREIGN KEY(user_id) REFERENCES user(id) ON DELETE CASCADE FOREIGN KEY(user_id) REFERENCES user(id) ON DELETE CASCADE
);` );`
); );