Skip to content

Commit 861b247

Browse files
authored
Merge pull request #4813 from jimis/master
Fix sqlalchemy error when migrating schema
2 parents f2a5b17 + 411e2de commit 861b247

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

web/server/codechecker_server/migrations/report/versions/c3dad71f8e6b_store_information_about_enabled_and_disabled_checkers_for_a_run.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def _print_progress(batch: int):
223223
# a syntax error on the "FROM" in the "UPDATE" query), this
224224
# branching here needs to stay.
225225
if dialect == "sqlite":
226-
db.execute(f"""
226+
db.execute(sa.text(f"""
227227
UPDATE reports
228228
SET
229229
checker_id = (
@@ -241,9 +241,9 @@ def _print_progress(batch: int):
241241
LIMIT {REPORT_UPDATE_CHUNK_SIZE}
242242
)
243243
;
244-
""")
244+
"""))
245245
else:
246-
db.execute(f"""
246+
db.execute(sa.text(f"""
247247
UPDATE reports
248248
SET
249249
checker_id = checkers.id
@@ -259,7 +259,7 @@ def _print_progress(batch: int):
259259
LIMIT {REPORT_UPDATE_CHUNK_SIZE}
260260
)
261261
;
262-
""")
262+
"""))
263263
_print_progress(i + 1)
264264

265265
db.commit()

0 commit comments

Comments
 (0)