diff --git a/migratron/command/run_migration.py b/migratron/command/run_migration.py index e02337e..adf7d6a 100644 --- a/migratron/command/run_migration.py +++ b/migratron/command/run_migration.py @@ -247,6 +247,7 @@ def _execute_filename(self, file_content, complete_filename): cursor.fetchall() # Force non async execution except ResourceClosedError: pass + conn.close() command = None else: raise ValueError("Invalid database type")