mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
chore: Fix table existence check in Database.py when upgrading version
This commit is contained in:
parent
53f5a1616c
commit
69bbd449b4
1 changed files with 1 additions and 1 deletions
|
|
@ -560,7 +560,7 @@ class Database:
|
|||
# Rename the old tables
|
||||
db_version_id = db_version.replace(".", "_")
|
||||
for table_name in metadata.tables.keys():
|
||||
if table_name not in Base.metadata.tables:
|
||||
if table_name in Base.metadata.tables:
|
||||
with self.__db_session() as session:
|
||||
if inspector.has_table(f"{table_name}_{db_version_id}"):
|
||||
self.logger.warning(f'Table "{table_name}" already exists, dropping it to make room for the new one')
|
||||
|
|
|
|||
Loading…
Reference in a new issue