summary refs log tree commit diff
path: root/synapse/storage/schema/delta/v10.sql
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/storage/schema/delta/v10.sql')
-rw-r--r--synapse/storage/schema/delta/v10.sql13
1 files changed, 13 insertions, 0 deletions
diff --git a/synapse/storage/schema/delta/v10.sql b/synapse/storage/schema/delta/v10.sql
index b84ce20ef3..8c4dfd5c1b 100644
--- a/synapse/storage/schema/delta/v10.sql
+++ b/synapse/storage/schema/delta/v10.sql
@@ -31,3 +31,16 @@ CREATE TABLE IF NOT EXISTS pushers (
   FOREIGN KEY(user_name) REFERENCES users(name),
   UNIQUE (app_id, pushkey)
 );
+
+CREATE TABLE IF NOT EXISTS push_rules (
+  id INTEGER PRIMARY KEY AUTOINCREMENT,
+  user_name TEXT NOT NULL,
+  rule_id TEXT NOT NULL,
+  priority_class TINYINT NOT NULL,
+  priority INTEGER NOT NULL DEFAULT 0,
+  conditions TEXT NOT NULL,
+  actions TEXT NOT NULL,
+  UNIQUE(user_name, rule_id)
+);
+
+CREATE INDEX IF NOT EXISTS push_rules_user_name on push_rules (user_name);