jedcunningham commented on code in PR #47592:
URL: https://github.com/apache/airflow/pull/47592#discussion_r1990565769
##########
airflow/migrations/versions/0050_3_0_0_add_dagbundlemodel.py:
##########
@@ -48,12 +49,16 @@ def upgrade():
sa.Column("last_refreshed", UtcDateTime(timezone=True), nullable=True),
sa.PrimaryKeyConstraint("name", name=op.f("dag_bundle_pkey")),
)
+
with op.batch_alter_table("dag", schema=None) as batch_op:
- batch_op.add_column(sa.Column("bundle_name", sa.String(length=250),
nullable=True))
+ batch_op.add_column(sa.Column("bundle_name", sa.String(length=250),
nullable=False))
Review Comment:
We can't just set it nullable false here - we first have to populate it with
data. Try this migration from 2.10 with some DAGs to see what I mean.
That means you will need an UPDATE statement like you had originally, you
just didn't have it in the right spot.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]