Fix incompatibility with existing database migrator after SQLAlchemy 2.0.
This commit is contained in:
parent
fc824a28f5
commit
3e00faefde
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user