This is an automated email from the ASF dual-hosted git repository.

Lee-W pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new d551b3ba603 fix: disable SQLite FK checks in 0111 migration downgrade 
(#65545)
d551b3ba603 is described below

commit d551b3ba60363ffed87f1f8fbcc68d44e12f6987
Author: Wei Lee <[email protected]>
AuthorDate: Tue Apr 21 14:21:09 2026 +0800

    fix: disable SQLite FK checks in 0111 migration downgrade (#65545)
---
 .../versions/0111_3_3_0_add_timetable_periodic_to_dag.py           | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git 
a/airflow-core/src/airflow/migrations/versions/0111_3_3_0_add_timetable_periodic_to_dag.py
 
b/airflow-core/src/airflow/migrations/versions/0111_3_3_0_add_timetable_periodic_to_dag.py
index a01a9e80460..d4d8b902c5c 100644
--- 
a/airflow-core/src/airflow/migrations/versions/0111_3_3_0_add_timetable_periodic_to_dag.py
+++ 
b/airflow-core/src/airflow/migrations/versions/0111_3_3_0_add_timetable_periodic_to_dag.py
@@ -30,6 +30,8 @@ from __future__ import annotations
 import sqlalchemy as sa
 from alembic import op
 
+from airflow.migrations.utils import disable_sqlite_fkeys
+
 revision = "9fabad868fdb"
 down_revision = "a4c2d171ae18"
 branch_labels = None
@@ -47,5 +49,6 @@ def upgrade():
 
 def downgrade():
     """Remove timetable_periodic column from DagModel."""
-    with op.batch_alter_table("dag", schema=None) as batch_op:
-        batch_op.drop_column("timetable_periodic")
+    with disable_sqlite_fkeys(op):
+        with op.batch_alter_table("dag", schema=None) as batch_op:
+            batch_op.drop_column("timetable_periodic")

Reply via email to