diff --git a/subunit2sql/migrations/versions/1679b5bc102c_add_subsecond_columns_to_test_runs_table.py b/subunit2sql/migrations/versions/1679b5bc102c_add_subsecond_columns_to_test_runs_table.py index fe1a969..e26e05b 100644 --- a/subunit2sql/migrations/versions/1679b5bc102c_add_subsecond_columns_to_test_runs_table.py +++ b/subunit2sql/migrations/versions/1679b5bc102c_add_subsecond_columns_to_test_runs_table.py @@ -43,7 +43,10 @@ def upgrade(): migration_context = context.get_context() if migration_context.dialect.name == 'mysql': with open(sql_path, 'r') as sql_file: - op.execute(sql_file.read()) + for line in sql_file.read().splitlines(): + # don't execute empty or commented lines + if line and not line.startswith('--'): + op.execute(line) else: op.add_column('test_runs', sa.Column('start_time_microsecond', sa.Integer(), default=0))