pierrejeambrun commented on code in PR #53501:
URL: https://github.com/apache/airflow/pull/53501#discussion_r2222647551


##########
airflow-core/src/airflow/models/dagrun.py:
##########
@@ -190,7 +190,7 @@ class DagRun(Base, LoggingMixin):
     # This number is incremented only when the DagRun is re-Queued,
     # when the DagRun is cleared.
     clear_number = Column(Integer, default=0, nullable=False, 
server_default="0")
-    backfill_id = Column(Integer, ForeignKey("backfill.id"), nullable=True)
+    backfill_id = Column(Integer, ForeignKey("backfill.id", 
ondelete="CASCADE"), nullable=True)

Review Comment:
   cc: @dstandish is that the expected behavior on backfill deletion ? Other 
alternative is to set the FK to null and keep the Run entry but that sounds 
wrong too. Maybe the current behavior is the best, it's not possible to delete 
a backfill that still has dagrun in it. 



-- 
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]

Reply via email to