diff options
author | Erik Johnston <erik@matrix.org> | 2014-09-24 15:27:59 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-09-24 15:27:59 +0100 |
commit | 70899d3ab29cd57301fb135130c940f312bfe482 (patch) | |
tree | 69383590001210f59f429ffb88c6afda4c26d789 /synapse/storage/schema | |
parent | Make deleting deletes not undelete (diff) | |
download | synapse-70899d3ab29cd57301fb135130c940f312bfe482.tar.xz |
Rename deletions to redactions
Diffstat (limited to 'synapse/storage/schema')
-rw-r--r-- | synapse/storage/schema/deletions.sql | 7 | ||||
-rw-r--r-- | synapse/storage/schema/delta/v4.sql | 11 | ||||
-rw-r--r-- | synapse/storage/schema/im.sql | 2 | ||||
-rw-r--r-- | synapse/storage/schema/redactions.sql | 8 |
4 files changed, 15 insertions, 13 deletions
diff --git a/synapse/storage/schema/deletions.sql b/synapse/storage/schema/deletions.sql deleted file mode 100644 index 2e2635317a..0000000000 --- a/synapse/storage/schema/deletions.sql +++ /dev/null @@ -1,7 +0,0 @@ -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/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; diff --git a/synapse/storage/schema/im.sql b/synapse/storage/schema/im.sql index 649d54b813..3aa83f5c8c 100644 --- a/synapse/storage/schema/im.sql +++ b/synapse/storage/schema/im.sql @@ -151,7 +151,7 @@ CREATE TABLE IF NOT EXISTS room_ops_levels( room_id TEXT NOT NULL, ban_level INTEGER, kick_level INTEGER, - delete_level INTEGER + redact_level INTEGER ); CREATE INDEX IF NOT EXISTS room_ops_levels_event_id ON room_ops_levels(event_id); diff --git a/synapse/storage/schema/redactions.sql b/synapse/storage/schema/redactions.sql new file mode 100644 index 0000000000..4c2829d05d --- /dev/null +++ b/synapse/storage/schema/redactions.sql @@ -0,0 +1,8 @@ +CREATE TABLE IF NOT EXISTS redactions ( + event_id TEXT NOT NULL, + redacts TEXT NOT NULL, + CONSTRAINT ev_uniq UNIQUE (event_id) +); + +CREATE INDEX IF NOT EXISTS redactions_event_id ON redactions (event_id); +CREATE INDEX IF NOT EXISTS redactions_redacts ON redactions (redacts); |