This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v3-2-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-2-test by this push:
new ba4be73c24a [v3-2-test] fix(migrations): move UPDATEs inside
disable_sqlite_fkeys in migration 0097 (#64876) (#64940)
ba4be73c24a is described below
commit ba4be73c24aa8936a9b8cdbd4073484a43345897
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Apr 9 10:52:03 2026 +0300
[v3-2-test] fix(migrations): move UPDATEs inside disable_sqlite_fkeys in
migration 0097 (#64876) (#64940)
(cherry picked from commit 666879c6735a08296e4d407709f50a0efe894eff)
Co-authored-by: Wei Lee <[email protected]>
---
.../0097_3_2_0_enforce_log_event_and_dag_is_stale_not_null.py | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git
a/airflow-core/src/airflow/migrations/versions/0097_3_2_0_enforce_log_event_and_dag_is_stale_not_null.py
b/airflow-core/src/airflow/migrations/versions/0097_3_2_0_enforce_log_event_and_dag_is_stale_not_null.py
index 49fb4bcc3f7..5af4f7be74d 100644
---
a/airflow-core/src/airflow/migrations/versions/0097_3_2_0_enforce_log_event_and_dag_is_stale_not_null.py
+++
b/airflow-core/src/airflow/migrations/versions/0097_3_2_0_enforce_log_event_and_dag_is_stale_not_null.py
@@ -40,13 +40,10 @@ airflow_version = "3.2.0"
def upgrade():
"""Bring existing deployments in line with 0010 and 0067."""
- # Ensure `log.event` can safely transition to NOT NULL.
- op.execute("UPDATE log SET event = '' WHERE event IS NULL")
-
- # Make sure DAG rows that survived the old 0067 path are not NULL.
- op.execute("UPDATE dag SET is_stale = false WHERE is_stale IS NULL")
-
with disable_sqlite_fkeys(op):
+ op.execute("UPDATE log SET event = '' WHERE event IS NULL")
+ op.execute("UPDATE dag SET is_stale = false WHERE is_stale IS NULL")
+
with op.batch_alter_table("log") as batch_op:
batch_op.alter_column("event", existing_type=sa.String(60),
nullable=False)