summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-24 11:06:41 +0100
committerErik Johnston <erik@matrix.org>2014-09-24 11:06:41 +0100
commit4354590a69d2a9b8cfb0dd1e1bc677c118e68be4 (patch)
tree801c48d126ddb97c24a32ea30877e76fff844830 /synapse/storage
parentRename 'pruned' to 'pruned_because' (diff)
downloadsynapse-4354590a69d2a9b8cfb0dd1e1bc677c118e68be4.tar.xz
Add v4 deltas to current sql.
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/__init__.py1
-rw-r--r--synapse/storage/schema/deletions.sql7
-rw-r--r--synapse/storage/schema/im.sql3
3 files changed, 10 insertions, 1 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index ac8ee89ab5..4e8a54c8f7 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -57,6 +57,7 @@ SCHEMAS = [
     "presence",
     "im",
     "room_aliases",
+    "deletions",
 ]
 
 
diff --git a/synapse/storage/schema/deletions.sql b/synapse/storage/schema/deletions.sql
new file mode 100644
index 0000000000..2e2635317a
--- /dev/null
+++ b/synapse/storage/schema/deletions.sql
@@ -0,0 +1,7 @@
+CREATE TABLE IF NOT EXISTS deletions (
+    event_id TEXT NOT NULL,
+    deletes TEXT NOT NULL
+);
+
+CREATE INDEX IF NOT EXISTS deletions_event_id ON deletions (event_id);
+CREATE INDEX IF NOT EXISTS deletions_deletes ON deletions (deletes);
diff --git a/synapse/storage/schema/im.sql b/synapse/storage/schema/im.sql
index 6ffea51310..649d54b813 100644
--- a/synapse/storage/schema/im.sql
+++ b/synapse/storage/schema/im.sql
@@ -150,7 +150,8 @@ CREATE TABLE IF NOT EXISTS room_ops_levels(
     event_id TEXT NOT NULL,
     room_id TEXT NOT NULL,
     ban_level INTEGER,
-    kick_level INTEGER
+    kick_level INTEGER,
+    delete_level INTEGER
 );
 
 CREATE INDEX IF NOT EXISTS room_ops_levels_event_id ON room_ops_levels(event_id);