Skip to content

Commit

Permalink
Fix static checks
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr authored and ashb committed Oct 7, 2022
1 parent 430f34a commit 7c7dff9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions airflow/migrations/versions/0118_2_4_2_add_missing_autoinc_fab.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@


def upgrade():
"""
Apply migration.
If these columns are already of the right type (i.e. created by our migration in 1.10.13 rather than FAB
itself in an earlier version), then this migration will issue an alter statement to change them to what
they already -- i.e. its a no-op.
These tables are small (100 to low 1k rows at most) so even if it did try to change it it's not costly to
do.
"""Apply migration.
If these columns are already of the right type (i.e. created by our
migration in 1.10.13 rather than FAB itself in an earlier version), this
migration will issue an alter statement to change them to what they already
are -- i.e. its a no-op.
These tables are small (100 to low 1k rows at most), so it's not too costly
to change them.
"""
conn = op.get_bind()
if conn.dialect.name in ['mssql', 'sqlite']:
Expand All @@ -70,7 +70,7 @@ def upgrade():
kwargs['type_'] = sa.Sequence(f'{table}_id_seq').next_value()
else:
kwargs['autoincrement'] = True
batch.alter_column("id", existing_type=sa.Integer(), eixsintg_nullable=False, **kwargs)
batch.alter_column("id", existing_type=sa.Integer(), existing_nullable=False, **kwargs)


def downgrade():
Expand Down
2 changes: 1 addition & 1 deletion docs/apache-airflow/img/airflow_erd.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e5c1950c11aa918f7063106979d700d856a477632abcc707076baa87f2840312
5d0b9bcb02f09e99338b2c230cf2c7b1e8af7f7ea675eca6f31e49e851e11941

0 comments on commit 7c7dff9

Please sign in to comment.