summary refs log tree commit diff
path: root/synapse/storage/schema/delta
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-11-11 13:59:40 +0000
committerMark Haines <mark.haines@matrix.org>2015-11-11 13:59:40 +0000
commit940a16119205115c02a3b23e9f3c67a08486bae0 (patch)
tree34d4eebc066d00b3fc0bfce76d35feb537129ed3 /synapse/storage/schema/delta
parentUse a background task to update databases to use the full text search (diff)
downloadsynapse-940a16119205115c02a3b23e9f3c67a08486bae0.tar.xz
Fix the background update
Diffstat (limited to 'synapse/storage/schema/delta')
-rw-r--r--synapse/storage/schema/delta/25/fts.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/synapse/storage/schema/delta/25/fts.py b/synapse/storage/schema/delta/25/fts.py
index e408d36da0..ce92f59025 100644
--- a/synapse/storage/schema/delta/25/fts.py
+++ b/synapse/storage/schema/delta/25/fts.py
@@ -47,11 +47,10 @@ def run_upgrade(cur, database_engine, *args, **kwargs):
     if isinstance(database_engine, PostgresEngine):
         for statement in get_statements(POSTGRES_TABLE.splitlines()):
             cur.execute(statement)
-        return
-
-    if isinstance(database_engine, Sqlite3Engine):
+    elif isinstance(database_engine, Sqlite3Engine):
         cur.execute(SQLITE_TABLE)
-        return
+    else:
+        raise Exception("Unrecognized database engine")
 
     cur.execute("SELECT MIN(stream_ordering) FROM events")
     rows = cur.fetchall()