diff options
author | David Baker <dave@matrix.org> | 2015-01-22 17:38:53 +0000 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2015-01-22 17:38:53 +0000 |
commit | ede491b4e0c14d44ce43dd5b152abf148b54b9ed (patch) | |
tree | 9393ce6b7beab8158fab5c958b8a957b7f1b1764 /synapse/storage/schema | |
parent | Add rest API & store for creating push rules (diff) | |
download | synapse-ede491b4e0c14d44ce43dd5b152abf148b54b9ed.tar.xz |
Oops: second part of commit dc938606
Diffstat (limited to 'synapse/storage/schema')
-rw-r--r-- | synapse/storage/schema/delta/v10.sql | 13 | ||||
-rw-r--r-- | synapse/storage/schema/pusher.sql | 13 |
2 files changed, 26 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); diff --git a/synapse/storage/schema/pusher.sql b/synapse/storage/schema/pusher.sql index b84ce20ef3..8c4dfd5c1b 100644 --- a/synapse/storage/schema/pusher.sql +++ b/synapse/storage/schema/pusher.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); |