🐛 fix(manager.py): add inspector to check if table "flow" exists before creating tables again
The change was made to fix a bug where the tables were being recreated even if they already existed. By adding an inspector to check if the table "flow" exists before recreating the tables, we can prevent unnecessary table creation and improve performance.
This commit is contained in:
parent
6618efc409
commit
9c70a3fe20
1 changed files with 1 additions and 0 deletions
|
|
@ -171,6 +171,7 @@ class DatabaseService(Service):
|
|||
|
||||
# Now check if the table "flow" exists, if not, something went wrong
|
||||
# and we need to create the tables again.
|
||||
inspector = inspect(self.engine)
|
||||
table_names = inspector.get_table_names()
|
||||
for table in current_tables:
|
||||
if table not in table_names:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue