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-04-14 13:53:20 +0100
committerErik Johnston <erik@matrix.org>2015-04-14 13:53:20 +0100
commit58d83399663a080c123d2f112b4f4d84accbc638 (patch)
tree170dfcb466d14dc29276d809a8cda6a4e7f224bc /synapse/storage/schema/schema_version.sql
parentCorrectly increment the _next_id initially (diff)
downloadsynapse-58d83399663a080c123d2f112b4f4d84accbc638.tar.xz
Add support for postgres instead of mysql. Change sql accourdingly. blob + varbinary -> bytea. No support for UNSIGNED or CREATE INDEX IF NOT EXISTS.
Diffstat (limited to 'synapse/storage/schema/schema_version.sql')
-rw-r--r--synapse/storage/schema/schema_version.sql14
1 files changed, 6 insertions, 8 deletions
diff --git a/synapse/storage/schema/schema_version.sql b/synapse/storage/schema/schema_version.sql
index e7fa6fe569..d9494611e0 100644
--- a/synapse/storage/schema/schema_version.sql
+++ b/synapse/storage/schema/schema_version.sql
@@ -14,16 +14,14 @@
  */
 
 CREATE TABLE IF NOT EXISTS schema_version(
-    `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')
+    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` VARCHAR(150) NOT NULL,
+    version INTEGER NOT NULL,
+    file VARCHAR(150) NOT NULL,
     UNIQUE(version, file)
 );
-
-CREATE INDEX IF NOT EXISTS schema_deltas_ver ON applied_schema_deltas(version);