summary refs log tree commit diff
path: root/synapse/storage/schema
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-12-16 18:42:09 +0000
committerDavid Baker <dave@matrix.org>2015-12-16 18:42:09 +0000
commit42ad49f5b75c2c645c4060026c21c5572f5b1063 (patch)
treec5ca59c9046ec92bcd6ec6d7ebf9b492fa86bbb0 /synapse/storage/schema
parentStore nothing instead of ['dont_notify'] for events with no notification requ... (diff)
downloadsynapse-42ad49f5b75c2c645c4060026c21c5572f5b1063.tar.xz
still very WIP, but now sends unread_notifications_count in the room object on sync (only actually corrrect in a full sync: hardcoded to 0 in incremental syncs).
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);