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
try:
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:
return False