You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ephraimbuddy (via GitHub)" <gi...@apache.org> on 2023/08/10 10:00:27 UTC

[GitHub] [airflow] ephraimbuddy commented on a diff in pull request #33280: Ensure include_deferred is not nullable

ephraimbuddy commented on code in PR #33280:
URL: https://github.com/apache/airflow/pull/33280#discussion_r1289878897


##########
airflow/migrations/versions/0128_2_7_0_add_include_deferred_column_to_pool.py:
##########
@@ -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(f"UPDATE slot_pool SET include_deferred = {sa.false().compile(op.get_bind())}")

Review Comment:
   Looks like this will break sql offline generation for postgres?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org