Skip to content

Commit

Permalink
fix update for different sqlalchemy
Browse files Browse the repository at this point in the history
  • Loading branch information
sqrd-max committed Apr 16, 2024
1 parent f88021c commit a0562d5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/ccdb/sql/update_v5.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
`runMax` INT NOT NULL,
`assignmentTime` TIMESTAMP NOT NULL,
PRIMARY KEY (`id`));
""",
"""
UPDATE `schemaVersions` SET schemaVersion = 5 WHERE `id` = 1;
""",
]
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a0562d5

Please sign in to comment.