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 17:14:56 +0000
committerMark Haines <mark.haines@matrix.org>2015-11-11 17:14:56 +0000
commite1627388d15fac534e22b80c2f7cb1a4e1afacc3 (patch)
tree0f4a184efb36c63ceacab39e26e9ada88f7d32c5 /synapse/storage/schema/delta
parentFix the background update (diff)
downloadsynapse-e1627388d15fac534e22b80c2f7cb1a4e1afacc3.tar.xz
Fix param style to work on both sqlite and postgres
Diffstat (limited to 'synapse/storage/schema/delta')
-rw-r--r--synapse/storage/schema/delta/25/fts.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/storage/schema/delta/25/fts.py b/synapse/storage/schema/delta/25/fts.py
index ce92f59025..5239d69073 100644
--- a/synapse/storage/schema/delta/25/fts.py
+++ b/synapse/storage/schema/delta/25/fts.py
@@ -68,7 +68,11 @@ def run_upgrade(cur, database_engine, *args, **kwargs):
         }
         progress_json = ujson.dumps(progress)
 
-        cur.execute(
+        sql = (
             "INSERT into background_updates (update_name, progress_json)"
-            " VALUES (?, ?)", ("event_search", progress_json)
+            " VALUES (?, ?)"
         )
+
+        sql = database_engine.convert_param_style(sql)
+
+        cur.execute(sql, ("event_search", progress_json))