diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-11-11 17:14:56 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-11-11 17:14:56 +0000 |
commit | e1627388d15fac534e22b80c2f7cb1a4e1afacc3 (patch) | |
tree | 0f4a184efb36c63ceacab39e26e9ada88f7d32c5 | |
parent | Fix the background update (diff) | |
download | synapse-e1627388d15fac534e22b80c2f7cb1a4e1afacc3.tar.xz |
Fix param style to work on both sqlite and postgres
-rw-r--r-- | synapse/storage/schema/delta/25/fts.py | 8 |
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)) |