summary refs log tree commit diff
path: root/synapse/storage/schema/delta
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-02-25 19:17:07 +0000
committerDavid Baker <dave@matrix.org>2015-02-25 19:17:07 +0000
commit94fa334b01d232bed96fd4ee05fc44d00330c2b9 (patch)
treef680ff0fb9a16a54a083d63e44fd2d6b04093a2a /synapse/storage/schema/delta
parentSYWEB-278 Don't allow rules with no rule_id. (diff)
downloadsynapse-94fa334b01d232bed96fd4ee05fc44d00330c2b9.tar.xz
Add enable/disable overlay for push rules (REST API not yet hooked up)
Diffstat (limited to 'synapse/storage/schema/delta')
-rw-r--r--synapse/storage/schema/delta/next_pushrules2.sql9
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/storage/schema/delta/next_pushrules2.sql b/synapse/storage/schema/delta/next_pushrules2.sql
new file mode 100644
index 0000000000..0212726448
--- /dev/null
+++ b/synapse/storage/schema/delta/next_pushrules2.sql
@@ -0,0 +1,9 @@
+CREATE TABLE IF NOT EXISTS push_rules_enable (
+  id INTEGER PRIMARY KEY AUTOINCREMENT,
+  user_name TEXT NOT NULL,
+  rule_id TEXT NOT NULL,
+  enabled TINYINT,
+  UNIQUE(user_name, rule_id)
+);
+
+CREATE INDEX IF NOT EXISTS push_rules_enable_user_name on push_rules_enable (user_name);