mirror of
https://github.com/Unleash/unleash.git
synced 2024-10-18 20:09:08 +02:00
26 lines
535 B
JavaScript
26 lines
535 B
JavaScript
|
'use strict';
|
||
|
|
||
|
exports.up = function (db, cb) {
|
||
|
db.runSql(
|
||
|
`
|
||
|
CREATE TABLE IF NOT EXISTS user_splash
|
||
|
(user_id INTEGER NOT NULL references users (id),
|
||
|
splash_id TEXT,
|
||
|
seen BOOLEAN NOT NULL DEFAULT false,
|
||
|
PRIMARY KEY (user_id, splash_id));
|
||
|
CREATE INDEX user_splash_user_id_idx ON user_splash (user_id);
|
||
|
);`,
|
||
|
cb,
|
||
|
);
|
||
|
};
|
||
|
|
||
|
exports.down = function (db, cb) {
|
||
|
db.runSql(
|
||
|
`
|
||
|
DROP INDEX user_splash_user_id_idx;
|
||
|
DROP TABLE user_splash;
|
||
|
`,
|
||
|
cb,
|
||
|
);
|
||
|
};
|