summary refs log tree commit diff
path: root/synapse/storage/schema/schema_version.sql
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-03-18 11:18:49 +0000
committerErik Johnston <erik@matrix.org>2015-03-18 11:18:49 +0000
commit89036579ed475464ccc8619344db513042e1d792 (patch)
tree9ad6ca439f6c9b002dcca260266dbc6d2a73654f /synapse/storage/schema/schema_version.sql
parentAdd a DistributionMetric to HTTP request/response processing time in the server (diff)
downloadsynapse-89036579ed475464ccc8619344db513042e1d792.tar.xz
Update schema to work with mariadb
Diffstat (limited to 'synapse/storage/schema/schema_version.sql')
-rw-r--r--synapse/storage/schema/schema_version.sql15
1 files changed, 7 insertions, 8 deletions
diff --git a/synapse/storage/schema/schema_version.sql b/synapse/storage/schema/schema_version.sql
index 0431e2d051..28762861e5 100644
--- a/synapse/storage/schema/schema_version.sql
+++ b/synapse/storage/schema/schema_version.sql
@@ -14,17 +14,16 @@
  */
 
 CREATE TABLE IF NOT EXISTS schema_version(
-    Lock char(1) NOT NULL DEFAULT 'X',  -- Makes sure this table only has one row.
-    version INTEGER NOT NULL,
-    upgraded BOOL NOT NULL,  -- Whether we reached this version from an upgrade or an initial schema.
-    CONSTRAINT schema_version_lock_x CHECK (Lock='X')
-    CONSTRAINT schema_version_lock_uniq UNIQUE (Lock)
+    `Lock` CHAR(1) NOT NULL DEFAULT 'X' UNIQUE,  -- Makes sure this table only has one row.
+    `version` INTEGER NOT NULL,
+    `upgraded` BOOL NOT NULL,  -- Whether we reached this version from an upgrade or an initial schema.
+    CHECK (`Lock`='X')
 );
 
 CREATE TABLE IF NOT EXISTS applied_schema_deltas(
-    version INTEGER NOT NULL,
-    file TEXT NOT NULL,
-    CONSTRAINT schema_deltas_ver_file UNIQUE (version, file) ON CONFLICT IGNORE
+    `version` INTEGER NOT NULL,
+    `file` VARCHAR(255) NOT NULL,
+    UNIQUE(version, file)
 );
 
 CREATE INDEX IF NOT EXISTS schema_deltas_ver ON applied_schema_deltas(version);