WIP on user achievements

+ Add MCI codes for points/count
+ Add docs for MCI codes
+ Record in stats, stat log, etc.
* Do not trigger more than once
* Code cleanup & organization, add classes, etc.
* Tweaks to DB table
This commit is contained in:
Bryan Ashby 2019-01-05 10:49:19 -07:00
parent 6410637359
commit c332b0f3ec
8 changed files with 242 additions and 89 deletions

View file

@ -196,7 +196,7 @@ const DB_INIT_TABLE = {
timestamp DATETIME NOT NULL,
match_field VARCHAR NOT NULL,
match_value VARCHAR NOT NULL,
UNIQUE(user_id, achievement_tag, match_field, match_value),
UNIQUE(user_id, achievement_tag, match_field),
FOREIGN KEY(user_id) REFERENCES user(id) ON DELETE CASCADE
);`
);