You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/09/22 14:29:44 UTC

[GitHub] [airflow] ashb commented on a change in pull request #18434: Add cascade to DagRun/TaskInstance relationship

ashb commented on a change in pull request #18434:
URL: https://github.com/apache/airflow/pull/18434#discussion_r714003363



##########
File path: airflow/models/dagrun.py
##########
@@ -124,7 +124,9 @@ class DagRun(Base, LoggingMixin):
         ),
     )
 
-    task_instances = relationship(TI, back_populates="dag_run")
+    task_instances = relationship(
+        TI, back_populates="dag_run", cascade='save-update, merge, delete, delete-orphan'

Review comment:
       ```suggestion
           TI, back_populates="dag_run", cascade='all, delete-orphan'
   ```
   I think? That seems to be what the docs recommend as "typical"




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