From dece31f41ee096712a4415f09f4f9725068efe9d Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Fri, 24 Jan 2020 11:40:27 +0000 Subject: Some fixes for #847 (#850) * Fix a couple of cases where backfilling events we already had causes panics, hopefully fix ordering of events, update GMSL dependency for backfill URL fixes * Remove commented out lines from output_room_events_table schema --- syncapi/storage/postgres/backward_extremities_table.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'syncapi/storage/postgres/backward_extremities_table.go') 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" -- cgit v1.2.3