Move is_migration_needed call under try block too
continuous-integration/drone/push Build is passing Details

pull/8/head
Inex Code 2022-01-11 08:54:57 +03:00
parent 355fc68232
commit 6c0af38e27
1 changed files with 6 additions and 6 deletions

View File

@ -19,10 +19,10 @@ def run_migrations():
for migration in migrations: for migration in migrations:
if migration.get_migration_name() not in skipped_migrations: if migration.get_migration_name() not in skipped_migrations:
if migration.is_migration_needed(): try:
try: if migration.is_migration_needed():
migration.migrate() migration.migrate()
except Exception as e: except Exception as e:
print(f"Error while migrating {migration.get_migration_name()}") print(f"Error while migrating {migration.get_migration_name()}")
print(e) print(e)
print("Skipping this migration") print("Skipping this migration")