summary refs log tree commit diff
path: root/synapse/storage/schema
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/storage/schema')
-rw-r--r--synapse/storage/schema/delta/27/event_actions.sql5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/storage/schema/delta/27/event_actions.sql b/synapse/storage/schema/delta/27/event_actions.sql
index 1246823a00..bbdaee990e 100644
--- a/synapse/storage/schema/delta/27/event_actions.sql
+++ b/synapse/storage/schema/delta/27/event_actions.sql
@@ -14,12 +14,13 @@
  */
 
 CREATE TABLE IF NOT EXISTS event_actions(
+    room_id TEXT NOT NULL,
     event_id TEXT NOT NULL,
     user_id TEXT NOT NULL,
     profile_tag VARCHAR(32),
     actions TEXT NOT NULL,
-    CONSTRAINT event_id_user_id_profile_tag_uniqueness UNIQUE (event_id, user_id, profile_tag)
+    CONSTRAINT event_id_user_id_profile_tag_uniqueness UNIQUE (room_id, event_id, user_id, profile_tag)
 );
 
 
-CREATE INDEX event_actions_event_id_user_id_profile_tag on event_actions(event_id, user_id, profile_tag);
+CREATE INDEX event_actions_room_id_event_id_user_id_profile_tag on event_actions(room_id, event_id, user_id, profile_tag);