Change column name, drop a useless one

This commit is contained in:
Bryan Ashby 2019-01-13 18:19:00 -07:00
parent 90137819dd
commit 403ee891d5
3 changed files with 7 additions and 8 deletions

View file

@ -180,7 +180,7 @@ class Achievements {
UserDb.get(
`SELECT COUNT() AS count
FROM user_achievement
WHERE user_id = ? AND achievement_tag = ? AND match_field = ?;`,
WHERE user_id = ? AND achievement_tag = ? AND match = ?;`,
[ user.userId, achievementTag, field],
(err, row) => {
return cb(err, row ? row.count : 0);
@ -193,9 +193,9 @@ class Achievements {
StatLog.incrementUserStat(info.client.user, UserProps.AchievementTotalPoints, info.details.points);
UserDb.run(
`INSERT INTO user_achievement (user_id, achievement_tag, timestamp, match_field, match_value)
VALUES (?, ?, ?, ?, ?);`,
[ info.client.user.userId, info.achievementTag, getISOTimestampString(info.timestamp), info.matchField, info.matchValue ],
`INSERT INTO user_achievement (user_id, achievement_tag, timestamp, match)
VALUES (?, ?, ?, ?);`,
[ info.client.user.userId, info.achievementTag, getISOTimestampString(info.timestamp), info.matchField ],
err => {
if(err) {
return cb(err);