gbonazzoli opened a new issue #18965:
URL: https://github.com/apache/airflow/issues/18965


   ### Apache Airflow version
   
   2.2.0 (latest released)
   
   ### Operating System
   
   Ubuntu 20.04.3 LTS
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-oracle==2.0.1
   apache-airflow-providers-ssh==2.1.1
   
   ### Deployment
   
   Virtualenv installation
   
   ### Deployment details
   
   _No response_
   
   ### What happened
   
   During the the command `airflow db upgrade` we got this error:
   
   ```
   [2021-10-12 06:25:10,721] {db.py:815} ERROR - Automatic migration is not 
available
   [2021-10-12 06:25:10,721] {db.py:817} ERROR - The task_instance table has 
1392 rows without a corresponding dag_run row. You must manually correct this 
problem (possibly by deleting the problem rows).
   ```
   
   ### What you expected to happen
   
   It would be nice if the output of `airflow db upgrade` is the list of 
objects' ID that needs to be deleted, in order to preserve future's version 
consistency.
   
   Or even better the SQL statement to manually remove them.
   
   I tried to identify those rows but it is not a trivial task.
   
   ### How to reproduce
   
   _No response_
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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