summary refs log tree commit diff
path: root/synapse/storage/schema/delta
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-03-19 13:42:39 +0000
committerErik Johnston <erik@matrix.org>2015-03-19 13:42:39 +0000
commitfae059cc18c0aab25b79d5352aa98ccfda8c637a (patch)
treeb168772b8381bc4df6139086f42d9646247fb295 /synapse/storage/schema/delta
parentUpdate schema to work with mariadb (diff)
downloadsynapse-fae059cc18c0aab25b79d5352aa98ccfda8c637a.tar.xz
Fix up schemas to work with mariadb
Diffstat (limited to 'synapse/storage/schema/delta')
-rw-r--r--synapse/storage/schema/delta/12/v12.sql16
-rw-r--r--synapse/storage/schema/delta/13/v13.sql10
-rw-r--r--synapse/storage/schema/delta/14/v14.sql4
3 files changed, 15 insertions, 15 deletions
diff --git a/synapse/storage/schema/delta/12/v12.sql b/synapse/storage/schema/delta/12/v12.sql
index fbe8486b96..42ea1b2ff5 100644
--- a/synapse/storage/schema/delta/12/v12.sql
+++ b/synapse/storage/schema/delta/12/v12.sql
@@ -18,11 +18,11 @@ CREATE TABLE IF NOT EXISTS rejections(
     reason VARCHAR(255) NOT NULL,
     last_check VARCHAR(255) NOT NULL,
     UNIQUE (event_id)
-);
+) ENGINE = INNODB;
 
 -- Push notification endpoints that users have configured
 CREATE TABLE IF NOT EXISTS pushers (
-  id INTEGER PRIMARY KEY,
+  id BIGINT PRIMARY KEY,
   user_name VARCHAR(255) NOT NULL,
   profile_tag VARCHAR(32) NOT NULL,
   kind VARCHAR(8) NOT NULL,
@@ -37,10 +37,10 @@ CREATE TABLE IF NOT EXISTS pushers (
   last_success BIGINT,
   failing_since BIGINT,
   UNIQUE (app_id, pushkey)
-);
+) ENGINE = INNODB;
 
 CREATE TABLE IF NOT EXISTS push_rules (
-  id INTEGER PRIMARY KEY,
+  id BIGINT PRIMARY KEY,
   user_name VARCHAR(255) NOT NULL,
   rule_id VARCHAR(255) NOT NULL,
   priority_class TINYINT NOT NULL,
@@ -48,16 +48,16 @@ CREATE TABLE IF NOT EXISTS push_rules (
   conditions VARCHAR(255) NOT NULL,
   actions VARCHAR(255) NOT NULL,
   UNIQUE(user_name, rule_id)
-);
+) ENGINE = INNODB;
 
 CREATE INDEX IF NOT EXISTS push_rules_user_name on push_rules (user_name);
 
 CREATE TABLE IF NOT EXISTS user_filters(
   user_id VARCHAR(255),
-  filter_id INTEGER,
+  filter_id BIGINT,
   filter_json BLOB
-);
+) ENGINE = INNODB;
 
 CREATE INDEX IF NOT EXISTS user_filters_by_user_id_filter_id ON user_filters(
     user_id, filter_id
-);
+) ENGINE = INNODB;
diff --git a/synapse/storage/schema/delta/13/v13.sql b/synapse/storage/schema/delta/13/v13.sql
index 68d4ebd896..f0a5daf445 100644
--- a/synapse/storage/schema/delta/13/v13.sql
+++ b/synapse/storage/schema/delta/13/v13.sql
@@ -14,18 +14,18 @@
  */
 
 CREATE TABLE IF NOT EXISTS application_services(
-    id INTEGER PRIMARY KEY,
+    id BIGINT PRIMARY KEY,
     url VARCHAR(255),
     token VARCHAR(255),
     hs_token VARCHAR(255),
     sender VARCHAR(255),
     UNIQUE(token)
-);
+) ENGINE = INNODB;
 
 CREATE TABLE IF NOT EXISTS application_services_regex(
-    id INTEGER PRIMARY KEY,
-    as_id INTEGER NOT NULL,
+    id BIGINT PRIMARY KEY,
+    as_id BIGINT NOT NULL,
     namespace INTEGER,  /* enum[room_id|room_alias|user_id] */
     regex VARCHAR(255),
     FOREIGN KEY(as_id) REFERENCES application_services(id)
-);
+) ENGINE = INNODB;
diff --git a/synapse/storage/schema/delta/14/v14.sql b/synapse/storage/schema/delta/14/v14.sql
index 2b50adbd61..a1260c5c1f 100644
--- a/synapse/storage/schema/delta/14/v14.sql
+++ b/synapse/storage/schema/delta/14/v14.sql
@@ -1,9 +1,9 @@
 CREATE TABLE IF NOT EXISTS push_rules_enable (
-  id INTEGER PRIMARY KEY,
+  id BIGINT PRIMARY KEY,
   user_name VARCHAR(255) NOT NULL,
   rule_id VARCHAR(255) NOT NULL,
   enabled TINYINT,
   UNIQUE(user_name, rule_id)
-);
+) ENGINE = INNODB;
 
 CREATE INDEX IF NOT EXISTS push_rules_enable_user_name on push_rules_enable (user_name);