From 9bae393776bfb34b2eeb38d6ee839b243986bfab Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Tue, 11 Oct 2022 14:14:22 +0100 Subject: [PATCH] Tweak query --- syncapi/storage/postgres/relations_table.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syncapi/storage/postgres/relations_table.go b/syncapi/storage/postgres/relations_table.go index 7e42389bd..e46b450bf 100644 --- a/syncapi/storage/postgres/relations_table.go +++ b/syncapi/storage/postgres/relations_table.go @@ -42,7 +42,7 @@ const insertRelationSQL = "" + "INSERT INTO syncapi_relations (" + " room_id, event_id, child_event_id, rel_type" + ") VALUES ($1, $2, $3, $4) " + - " ON CONFLICT syncapi_relations_unique DO UPDATE SET event_id=EXCLUDED.event_id" + + " ON CONFLICT ON CONSTRAINT syncapi_relations_unique DO UPDATE SET event_id=EXCLUDED.event_id" + " RETURNING id" const deleteRelationSQL = "" +