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


##########
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:
   Deleting a backfill will now delete all the Runs associated with it, leaving 
run orphaned from the backfill.
   
   Maybe we can just find a way to fix the delete function to be sure to first 
delete runs before deleting backfills. Therefore we will not need to update the 
db.



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