aboutsummaryrefslogtreecommitdiff
path: root/syncapi/storage/postgres/backward_extremities_table.go
diff options
context:
space:
mode:
Diffstat (limited to 'syncapi/storage/postgres/backward_extremities_table.go')
-rw-r--r--syncapi/storage/postgres/backward_extremities_table.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/syncapi/storage/postgres/backward_extremities_table.go b/syncapi/storage/postgres/backward_extremities_table.go
index 476d26fa..1489f7f9 100644
--- a/syncapi/storage/postgres/backward_extremities_table.go
+++ b/syncapi/storage/postgres/backward_extremities_table.go
@@ -33,7 +33,8 @@ CREATE TABLE IF NOT EXISTS syncapi_backward_extremities (
const insertBackwardExtremitySQL = "" +
"INSERT INTO syncapi_backward_extremities (room_id, event_id)" +
- " VALUES ($1, $2)"
+ " VALUES ($1, $2)" +
+ " ON CONFLICT DO NOTHING"
const selectBackwardExtremitiesForRoomSQL = "" +
"SELECT event_id FROM syncapi_backward_extremities WHERE room_id = $1"