MASTREX commented on issue #54071:
URL: https://github.com/apache/airflow/issues/54071#issuecomment-3234436965

   I think you did not understood what I was trying to say
   
   > Here is the AI explanation
   
   The problem lies in the handling of the `task_instance_id` column.
   
   - **Upgrade:** The original `task_instance_id` column is _deleted_, and a 
different column (`try_id`) is _renamed_ to `task_instance_id`. This means the 
data that was in the original `task_instance_id` is **permanently lost**.
       
   - **Downgrade:** The downgrade script assumes it can just rename the newly 
named `task_instance_id` back to `try_id` and then add a _new_ 
`task_instance_id` column. The data from the original `task_instance_id` is not 
recovered because it was dropped in the upgrade.
       
   This will lead to an inconsistency. If a user runs the upgrade and then the 
downgrade, the `task_instance_history` table will have a different set of 
columns and potentially different data than it had before the upgrade. The 
original `task_instance_id` column and its data are gone forever.
   
   **To avoid inconsistency and failure, the upgrade and downgrade scripts 
should be designed to be symmetrical and reversible.**
   


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