WIP on user achievements

* Hook up events for testing
* Start to plug in experimental interrupt
This commit is contained in:
Bryan Ashby 2019-01-02 22:13:42 -07:00
parent c5a72c7356
commit a34dab6a73
5 changed files with 156 additions and 2 deletions

View file

@ -189,6 +189,18 @@ const DB_INIT_TABLE = {
);`
);
dbs.user.run(
`CREATE TABLE IF NOT EXISTS user_achievement (
user_id INTEGER NOT NULL,
achievement_tag VARCHAR NOT NULL,
timestamp DATETIME NOT NULL,
match_field VARCHAR NOT NULL,
match_value VARCHAR NOT NULL,
UNIQUE(user_id, achievement_tag, match_field, match_value),
FOREIGN KEY(user_id) REFERENCES user(id) ON DELETE CASCADE
);`
);
return cb(null);
},