-
Notifications
You must be signed in to change notification settings - Fork 16.4k
fix(migrations): from 2.2.0 to 2.11.0 for Sqlite #50745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 |
airflow/migrations/versions/0093_2_2_0_taskinstance_keyed_to_dagrun.py
Outdated
Show resolved
Hide resolved
jscheffl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 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.