From eb102952c691dabc8cf9efdb1f4b65b4437c2399 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Thu, 8 Sep 2022 10:38:46 -0400 Subject: [PATCH] temp --- .../schema/main/delta/72/07thread_receipts.sql.postgres | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/synapse/storage/schema/main/delta/72/07thread_receipts.sql.postgres b/synapse/storage/schema/main/delta/72/07thread_receipts.sql.postgres index 2b776ea92fbe..55fff9e278e7 100644 --- a/synapse/storage/schema/main/delta/72/07thread_receipts.sql.postgres +++ b/synapse/storage/schema/main/delta/72/07thread_receipts.sql.postgres @@ -22,13 +22,9 @@ ALTER TABLE receipts_graph ADD COLUMN thread_id TEXT; -- Rebuild the unique constraint with the thread_id. ALTER TABLE receipts_linearized - DROP CONSTRAINT IF EXISTS receipts_linearized_uniqueness; -ALTER TABLE receipts_linearized - ADD CONSTRAINT receipts_linearized_uniqueness + ADD CONSTRAINT receipts_linearized_uniqueness_thread UNIQUE (room_id, receipt_type, user_id, thread_id); ALTER TABLE receipts_graph - DROP CONSTRAINT IF EXISTS receipts_graph_uniqueness; -ALTER TABLE receipts_graph - ADD CONSTRAINT receipts_graph_uniqueness + ADD CONSTRAINT receipts_graph_uniqueness_thread UNIQUE (room_id, receipt_type, user_id, thread_id);