Skip to content

fix: disable SQLite FK checks in 0111 migration downgrade#65545

Merged
Lee-W merged 1 commit intoapache:mainfrom
astronomer:add-missing-disable-sqlite-fk-key-for0111-migration
Apr 21, 2026
Merged

fix: disable SQLite FK checks in 0111 migration downgrade#65545
Lee-W merged 1 commit intoapache:mainfrom
astronomer:add-missing-disable-sqlite-fk-key-for0111-migration

Conversation

@Lee-W
Copy link
Copy Markdown
Member

@Lee-W Lee-W commented Apr 20, 2026


Why

SQLite doesn't support altering tables with foreign keys enabled. batch_alter_table recreates the dag table during drop_column, so the downgrade fails on SQLite without first disabling FK checks.

What

Wrap the drop_column with disable_sqlite_fkeys(op), matching other migrations that alter dag.

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@Lee-W Lee-W requested a review from ephraimbuddy as a code owner April 20, 2026 14:50
@boring-cyborg boring-cyborg Bot added the area:db-migrations PRs with DB migration label Apr 20, 2026
@Lee-W Lee-W requested a review from jason810496 April 21, 2026 05:33
@Lee-W Lee-W merged commit d551b3b into apache:main Apr 21, 2026
78 checks passed
@Lee-W Lee-W deleted the add-missing-disable-sqlite-fk-key-for0111-migration branch April 21, 2026 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:db-migrations PRs with DB migration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants