diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-11-01 14:53:46 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-11-01 14:53:46 +0100 |
commit | 91169091fc1b2f1c8f3d95aca239457991c5c86b (patch) | |
tree | b83d6ee099c88fe06293d1afc793789782f21849 /server.js | |
parent | be9037c5df8d155302c762b26e09ffab7d9124e5 (diff) | |
download | server-91169091fc1b2f1c8f3d95aca239457991c5c86b.tar.gz |
fix unique constraint violation when adding users to level 2 tournaments.
Diffstat (limited to 'server.js')
-rw-r--r-- | server.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2768,7 +2768,7 @@ const TM_SELECT_QUEUE_BLACKLIST = SQL("select me, you from contacts join tm_queu const TM_SELECT_QUEUE_NAMES = SQL("select user_id, name, level from tm_queue join users using(user_id) where seed_id=? and level=? order by time") const TM_SELECT_QUEUE = SQL("select user_id from tm_queue where seed_id=? and level=? order by time desc").pluck() const TM_DELETE_QUEUE = SQL("delete from tm_queue where user_id=? and seed_id=? and level=?") -const TM_INSERT_QUEUE = SQL("insert into tm_queue (user_id, seed_id, level) values (?,?,?)") +const TM_INSERT_QUEUE = SQL("insert or ignore into tm_queue (user_id, seed_id, level) values (?,?,?)") const TM_SELECT_SEED = SQL("select * from tm_seeds where seed_id = ?") const TM_SELECT_SEED_BY_NAME = SQL("select * from tm_seeds where seed_name = ?") |