Skip to content

Commit

Permalink
Don't batch migrations if we don't need to
Browse files Browse the repository at this point in the history
  • Loading branch information
blag committed Nov 25, 2022
1 parent 2cb2d99 commit 652f745
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@

def upgrade():
"""Add is_orphaned to DatasetModel"""
with op.batch_alter_table("dataset") as batch_op:
batch_op.add_column(sa.Column("is_orphaned", sa.Boolean, nullable=False, server_default="False"))
op.add_column("dataset", sa.Column("is_orphaned", sa.Boolean, nullable=False, server_default="False"))


def downgrade():
"""Remove is_orphaned to DatasetModel"""
with op.batch_alter_table("dataset", schema=None) as batch_op:
batch_op.drop_column("is_orphaned")
"""Remove is_orphaned from DatasetModel"""
op.drop_column("dataset", "is_orphaned")
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 @@
ab67d584c9912231e6963abdd710ede4228cb2f23d67219485361c75d4f9bbd7
7854eceb2ff93010d984e5485c4266f6600eccab934f1aa86900b8b58bfc0915

0 comments on commit 652f745

Please sign in to comment.