summary refs log tree commit diff
path: root/synapse/storage/schema/delta/v4.sql
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/storage/schema/delta/v4.sql')
-rw-r--r--synapse/storage/schema/delta/v4.sql11
1 files changed, 6 insertions, 5 deletions
diff --git a/synapse/storage/schema/delta/v4.sql b/synapse/storage/schema/delta/v4.sql
index fc8bb5ad84..25d2ead450 100644
--- a/synapse/storage/schema/delta/v4.sql
+++ b/synapse/storage/schema/delta/v4.sql
@@ -1,11 +1,12 @@
-CREATE TABLE IF NOT EXISTS deletions (
+CREATE TABLE IF NOT EXISTS redactions (
     event_id TEXT NOT NULL,
-    deletes TEXT NOT NULL
+    redacts TEXT NOT NULL,
+    CONSTRAINT ev_uniq UNIQUE (event_id)
 );
 
-CREATE INDEX IF NOT EXISTS deletions_event_id ON deletions (event_id);
-CREATE INDEX IF NOT EXISTS deletions_deletes ON deletions (deletes);
+CREATE INDEX IF NOT EXISTS redactions_event_id ON redactions (event_id);
+CREATE INDEX IF NOT EXISTS redactions_redacts ON redactions (redacts);
 
-ALTER TABLE room_ops_levels ADD COLUMN delete_level INTEGER;
+ALTER TABLE room_ops_levels ADD COLUMN redact_level INTEGER;
 
 PRAGMA user_version = 4;