1
0
mirror of synced 2024-11-23 22:10:59 +01:00

Fix incompatibility with existing database migrator after SQLAlchemy 2.0.

This commit is contained in:
Jennifer Taylor 2024-09-26 01:21:17 +00:00
parent fc824a28f5
commit 3e00faefde

View File

@ -135,7 +135,7 @@ class Data:
# See if the DB was already created # See if the DB was already created
try: try:
cursor = self.__session.execute(text("SELECT COUNT(version_num) AS count FROM alembic_version")) cursor = self.__session.execute(text("SELECT COUNT(version_num) AS count FROM alembic_version"))
return cursor.fetchone()["count"] == 1 return cursor.mappings().fetchone()["count"] == 1
except ProgrammingError: except ProgrammingError:
return False return False