mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-12 23:54:38 +02:00
WIP on user achievements
* Hook up events for testing * Start to plug in experimental interrupt
This commit is contained in:
parent
c5a72c7356
commit
a34dab6a73
5 changed files with 156 additions and 2 deletions
|
@ -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);
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue