From ede491b4e0c14d44ce43dd5b152abf148b54b9ed Mon Sep 17 00:00:00 2001
From: David Baker <dave@matrix.org>
Date: Thu, 22 Jan 2015 17:38:53 +0000
Subject: Oops: second part of commit dc938606

---
 synapse/storage/schema/pusher.sql | 13 +++++++++++++
 1 file changed, 13 insertions(+)

(limited to 'synapse/storage/schema/pusher.sql')

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);
-- 
cgit 1.4.1

