Fix param style to work on both sqlite and postgres

This commit is contained in:
Mark Haines 2015-11-11 17:14:56 +00:00
parent 940a161192
commit e1627388d1
1 changed files with 6 additions and 2 deletions

View File

@ -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))