penggongkui commented on pull request #16960:
URL: https://github.com/apache/airflow/pull/16960#issuecomment-879555161


   @uranusjr accoding the sqla document, default behavior is setting their 
foreign key reference to NULL.
   
   https://docs.sqlalchemy.org/en/14/orm/cascades.html#unitofwork-cascades
   
   
![image](https://user-images.githubusercontent.com/49138427/125555612-f85a4172-2543-4b88-85ce-c4b07f902d40.png)
   
   also I have do a unit_test  do session.delete(ti), it will set the dag_run's 
dag_id && execution_date to null(just like deleted the dag_run)
   
   anyway, I have use a another way to delete the taskinstance(it's a little 
ugly)


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