Skip to content

Commit 923c361

Browse files
committed
add missing constraint to users_clues table for clueid in db
1 parent 5ed30a7 commit 923c361

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

services/usersMethods.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ async function setUserScore(userid, gameid, score) {
3838
async function updateUserClue(userid, clueid, answeredCorrect, catid, gameid) {
3939

4040
const rows = await client.query(
41-
`INSERT INTO users_clues (userid_clues, clueid, answeredcorrect,catid, gameid) VALUES (${userid}, ${clueid},${answeredCorrect},${catid}, ${gameid}) ON CONFLICT ON CONSTRAINT clueid_constraint DO UPDATE SET answeredcorrect = ${answeredCorrect} RETURNING *`
41+
`INSERT INTO users_clues (userid_clues, clueid, answeredcorrect,catid, gameid) VALUES (${userid}, ${clueid},${answeredCorrect},${catid}, ${gameid}) ON CONFLICT ON CONSTRAINT sqlpropk_clueid DO UPDATE SET answeredcorrect = ${answeredCorrect} RETURNING *`
4242
);
4343

4444
return {

0 commit comments

Comments
 (0)