gbonazzoli commented on issue #18965:
URL: https://github.com/apache/airflow/issues/18965#issuecomment-942930608
I found the solution to delete the offending records:
```
delete FROM task_instance where (execution_date, task_id, dag_id) in (
SELECT task_instance.execution_date,
task_instance.task_id,
task_instance.dag_id
FROM task_instance
LEFT JOIN dag_run ON task_instance.dag_id = dag_run.dag_id
AND task_instance.execution_date = dag_run.execution_date
WHERE dag_run.run_id IS NULL
);
commit;
```
And I successfully migrated to 2.2.0
--
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]