From a0562d5172653e50c448cb8e65944250f3397513 Mon Sep 17 00:00:00 2001 From: "sqrd.max" Date: Wed, 17 Apr 2024 00:00:03 +0300 Subject: [PATCH] fix update for different sqlalchemy --- python/ccdb/sql/update_v5.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/ccdb/sql/update_v5.py b/python/ccdb/sql/update_v5.py index fbd0bbc..1496ece 100644 --- a/python/ccdb/sql/update_v5.py +++ b/python/ccdb/sql/update_v5.py @@ -38,7 +38,8 @@ `runMax` INT NOT NULL, `assignmentTime` TIMESTAMP NOT NULL, PRIMARY KEY (`id`)); - + """, + """ UPDATE `schemaVersions` SET schemaVersion = 5 WHERE `id` = 1; """, ] @@ -86,7 +87,7 @@ def update_v5(engine, queries=None): :param queries: List of SQL queries to be executed. """ - connection_string = engine.url + connection_string = str(engine.url) if not queries: if 'mysql' in connection_string or 'mariadb' in connection_string: queries = mysql_update_v5_queries