fix(migrations): from 2.2.0 to 2.11.0 for Sqlite#50745
fix(migrations): from 2.2.0 to 2.11.0 for Sqlite#50745kaxil merged 9 commits intoapache:v2-11-testfrom
Conversation
* 0093: skip pk constant drop as sqlite does not support it * 0110: backport _drop_fkey_if_exists for handling fk in sqlite * 0142: explicitly list down the column names when recreating dag_run table
…0093 but pass if it can't
|
Ups, something wrong with the PR and target branch is incorrect. |
Ah.. right. Checked out from v2-11-test but forget to change the base branch when pushing. Thanks! Just updated it |
jscheffl
left a comment
There was a problem hiding this comment.
Okay as fix, otherwise the if conditions in that old migration code would need to be optimized for readability :-D
Just get back to my laptop before bed 🙌 . removed one layer of nested if-else. please check whether it's a bit better 👀 |
Better! Thannks for un-rolling the if - but CI is not convinced. So maybe tomorrow after some sleep you will make it happen :-D |
Diff ruff version 🤦♂️ I'm still using the one on main. I extracted that logic to the utils as it was used in |
|
Found a few more issues related. so I extracted the sqlite thing as another function in utils |
|
Forget to update the erd. 🤦♂️Will update it after dinner |
apache/airflow#50745 will be released in airflow 2.11
apache/airflow#50745 will be released in airflow 2.11
apache/airflow#50745 will be released in airflow 2.11
apache/airflow#50745 will be released in airflow 2.11
apache/airflow#50745 will be released in airflow 2.11
apache/airflow#50745 will be released in airflow 2.11
apache/airflow#50745 will be released in airflow 2.11
apache/airflow#50745 will be released in airflow 2.11
## Why `airflow db migrate` failed when I migrated an old airflow instance to 2.11.0rc1 ## What Following up #49301 and trying to fix some found issues * `0093 upgrade, 0100 upgrade, 0060 downgrade, 0064 downgrade`: since SQite does not support constant drop, follow how #49301 deals with fk for SQlite * `0110`: backport _drop_fkey_if_exists for handling fk in sqlite * `0142`: Explicitly list down the column names when recreating dag_run table * `0073`: add a safeguard to ensure we're not wrongly update the name
Why
airflow db migratefailed when I migrated an old airflow instance to 2.11.0rc1What
Following up #49301 and trying to fix some found issues
0093 upgrade, 0100 upgrade, 0060 downgrade, 0064 downgrade: since SQite does not support constant drop, follow how Fix DB migrations from 2.10.5 to 3.0.0 for SQlite #49301 deals with fk for SQlite0110: backport _drop_fkey_if_exists for handling fk in sqlite0142: Explicitly list down the column names when recreating dag_run table0073: add a safeguard to ensure we're not wrongly update the name^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.