summary refs log tree commit diff
path: root/synapse/storage/schema
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-01 13:44:19 +0100
committerErik Johnston <erik@matrix.org>2014-09-01 14:39:09 +0100
commit865469f233aa37d3fa0de9a77dfb6bc597c569d7 (patch)
tree2bbd9037e0ac535369c0eb8485f8610ba28d700c /synapse/storage/schema
parentMerge branch 'develop' of github.com:matrix-org/synapse into room_config (diff)
downloadsynapse-865469f233aa37d3fa0de9a77dfb6bc597c569d7.tar.xz
Implement power level lists, default power levels and send_evnet_level/add_state_level events.
Diffstat (limited to 'synapse/storage/schema')
-rw-r--r--synapse/storage/schema/im.sql20
1 files changed, 20 insertions, 0 deletions
diff --git a/synapse/storage/schema/im.sql b/synapse/storage/schema/im.sql
index c20516b7fa..447c1d29a2 100644
--- a/synapse/storage/schema/im.sql
+++ b/synapse/storage/schema/im.sql
@@ -126,6 +126,26 @@ CREATE INDEX IF NOT EXISTS room_default_levels_event_id ON room_default_levels(e
 CREATE INDEX IF NOT EXISTS room_default_levels_room_id ON room_default_levels(room_id);
 
 
+CREATE TABLE IF NOT EXISTS room_add_state_levels(
+    event_id TEXT NOT NULL,
+    room_id TEXT NOT NULL,
+    level INTEGER NOT NULL
+);
+
+CREATE INDEX IF NOT EXISTS room_add_state_levels_event_id ON room_add_state_levels(event_id);
+CREATE INDEX IF NOT EXISTS room_add_state_levels_room_id ON room_add_state_levels(room_id);
+
+
+CREATE TABLE IF NOT EXISTS room_send_event_levels(
+    event_id TEXT NOT NULL,
+    room_id TEXT NOT NULL,
+    level INTEGER NOT NULL
+);
+
+CREATE INDEX IF NOT EXISTS room_send_event_levels_event_id ON room_send_event_levels(event_id);
+CREATE INDEX IF NOT EXISTS room_send_event_levels_room_id ON room_send_event_levels(room_id);
+
+
 CREATE TABLE IF NOT EXISTS room_hosts(
     room_id TEXT NOT NULL,
     host TEXT NOT NULL,