Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure include_deferred is not nullable #33280

Merged
merged 4 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@
def upgrade():
"""Apply add include_deferred column to pool"""
with op.batch_alter_table("slot_pool") as batch_op:
batch_op.add_column(sa.Column("include_deferred", sa.Boolean, default=False))
batch_op.add_column(sa.Column("include_deferred", sa.Boolean))
# Different databases support different literal for FALSE. This is fine.
op.execute(sa.text(f"UPDATE slot_pool SET include_deferred = {sa.false().compile(op.get_bind())}"))
with op.batch_alter_table("slot_pool") as batch_op:
batch_op.alter_column("include_deferred", existing_type=sa.Boolean, nullable=False)


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 @@
52b0e45032fb1c60274374e0114cf199dfb759adc0a4fe32964136347457506a
266a8533dca6d9c7e984341bfe29e99f29217e44529455a49e7c4a5faccdcdf3
8 changes: 4 additions & 4 deletions docs/apache-airflow/img/airflow_erd.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.