Fix INSERT clause for cases of overlap

This commit is contained in:
Bryan Ashby 2019-01-20 12:22:42 -07:00
parent 9b7b5c6fff
commit 34f0afc175
1 changed files with 1 additions and 1 deletions

View File

@ -193,7 +193,7 @@ class Achievements {
StatLog.incrementUserStat(info.client.user, UserProps.AchievementTotalPoints, info.details.points); StatLog.incrementUserStat(info.client.user, UserProps.AchievementTotalPoints, info.details.points);
UserDb.run( UserDb.run(
`INSERT INTO user_achievement (user_id, achievement_tag, timestamp, match) `INSERT OR IGNORE INTO user_achievement (user_id, achievement_tag, timestamp, match)
VALUES (?, ?, ?, ?);`, VALUES (?, ?, ?, ?);`,
[ info.client.user.userId, info.achievementTag, getISOTimestampString(info.timestamp), info.matchField ], [ info.client.user.userId, info.achievementTag, getISOTimestampString(info.timestamp), info.matchField ],
err => { err => {