You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2025/09/19 14:34:50 UTC
(airflow) branch v3-1-test updated (dc2cc65cde5 -> 60776eafcec)
This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a change to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
from dc2cc65cde5 Fall back to stringification for XCom (#55880)
new 49ef1bdb058 Fix migrations for sqlite (#55883)
new b5a84c1f633 Fix:added none to lastupdated Date if event is not in queue (#54652)
new 204edbf4973 Fix (internationalization): Simplified Chinese fills in gaps and removes extra content, optimizes description (#55564)
new 60776eafcec Update 3.1.0 release notes based on latest cherry-picks
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
RELEASE_NOTES.rst | 8 ++-
airflow-core/docs/img/airflow_erd.sha256 | 2 +-
.../api_fastapi/core_api/routes/ui/assets.py | 12 +++-
.../versions/0041_3_0_0_rename_dataset_as_asset.py | 12 +++-
...4_3_1_0_add_last_parse_duration_to_dag_model.py | 15 +++-
.../ui/public/i18n/locales/zh-CN/admin.json | 10 +--
.../ui/public/i18n/locales/zh-CN/common.json | 19 +++--
.../airflow/ui/public/i18n/locales/zh-CN/dag.json | 3 +
.../airflow/ui/public/i18n/locales/zh-CN/dags.json | 2 +-
.../ui/public/i18n/locales/zh-CN/dashboard.json | 4 +-
.../airflow/ui/public/i18n/locales/zh-CN/hitl.json | 9 ++-
.../api_fastapi/core_api/routes/ui/test_assets.py | 83 ++++++++++++++++++++++
reproducible_build.yaml | 4 +-
13 files changed, 157 insertions(+), 26 deletions(-)
(airflow) 03/04: Fix (internationalization): Simplified Chinese fills in gaps and removes extra content, optimizes description (#55564)
Posted by ka...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 204edbf49731b2b74fd6af27b3f34e45fffe2f18
Author: Fortytwo <fo...@gmail.com>
AuthorDate: Fri Sep 19 22:34:05 2025 +0800
Fix (internationalization): Simplified Chinese fills in gaps and removes extra content, optimizes description (#55564)
* feat(i18n): Add Chinese (zh-CN) internationalization support
This commit adds Simplified Chinese (zh-CN) internationalization support to Airflow UI.
The changes include:
- Added complete Simplified Chinese translation files
- Updated i18n configuration to include zh-CN locale
- Updated translation completeness check script
- Updated CODEOWNERS for zh-CN translations
- Optimized translations for better user experience
- Unified terminology for consistency (e.g. backfill, login)
- Updated DAG/DAGs capitalization according to #55099
Co-authored-by: @gyli
* Apply suggestions from code review
* fixup! Apply suggestions from code review
---------
Co-authored-by: Kaxil Naik <ka...@gmail.com>
(cherry picked from commit 6204490195e6cc1e87d320c95702b6410d589f17)
---
.../airflow/ui/public/i18n/locales/zh-CN/admin.json | 10 +++++-----
.../airflow/ui/public/i18n/locales/zh-CN/common.json | 19 +++++++++++++++----
.../src/airflow/ui/public/i18n/locales/zh-CN/dag.json | 3 +++
.../airflow/ui/public/i18n/locales/zh-CN/dags.json | 2 +-
.../ui/public/i18n/locales/zh-CN/dashboard.json | 4 ++--
.../airflow/ui/public/i18n/locales/zh-CN/hitl.json | 9 ++++++---
6 files changed, 32 insertions(+), 15 deletions(-)
diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/admin.json b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/admin.json
index b0adebfe4b9..c8853ac873c 100644
--- a/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/admin.json
+++ b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/admin.json
@@ -16,7 +16,7 @@
"columns": {
"connectionId": "连接 ID",
"connectionType": "连接类型",
- "host": "主机",
+ "host": "主机地址",
"port": "端口"
},
"connection_one": "连接",
@@ -53,7 +53,7 @@
"error": "获取连接类型元数据失败",
"standardFields": {
"description": "描述",
- "host": "主机",
+ "host": "主机地址",
"login": "登录",
"password": "密码",
"port": "端口",
@@ -143,15 +143,15 @@
"options": {
"fail": {
"description": "如果检测到任何已存在的变量,则导入失败。",
- "title": "失败"
+ "title": "严格模式"
},
"overwrite": {
"description": "发生冲突时覆盖变量。",
- "title": "覆盖"
+ "title": "覆盖模式"
},
"skip": {
"description": "忽略导入已存在的变量。",
- "title": "跳过"
+ "title": "非严格模式"
}
},
"title": "导入变量",
diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/common.json b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/common.json
index 9000a39b3bf..2f5d8930691 100644
--- a/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/common.json
+++ b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/common.json
@@ -8,6 +8,12 @@
"Variables": "变量"
},
"allOperators": "全部操作器",
+ "appearance": {
+ "appearance": "外观",
+ "darkMode": "深色模式",
+ "lightMode": "浅色模式",
+ "systemMode": "跟随系统设置"
+ },
"asset_one": "资源",
"asset_other": "资源",
"assetEvent_one": "资源事件",
@@ -33,6 +39,7 @@
"fileLocation": "文件位置",
"hasTaskConcurrencyLimits": "有任务并发数限制",
"lastExpired": "最后过期时间",
+ "lastParseDuration": "最后解析耗时",
"lastParsed": "最后解析时间",
"latestDagVersion": "最新 Dag 版本",
"latestRun": "上次 Dag 执行",
@@ -93,6 +100,12 @@
"or": "或"
},
"filter": "筛选",
+ "filters": {
+ "logicalDateFrom": "逻辑日期起始",
+ "logicalDateTo": "逻辑结束日期",
+ "runAfterFrom": "执行时间起始",
+ "runAfterTo": "执行时间结束"
+ },
"logicalDate": "逻辑日期",
"logout": "退出登录",
"logoutConfirmation": "确定要退出登录吗?",
@@ -184,8 +197,6 @@
"up_for_retry": "等待重试",
"upstream_failed": "上游任务失败"
},
- "switchToDarkMode": "切换到深色模式",
- "switchToLightMode": "切换到浅色模式",
"table": {
"completedAt": "完成时间",
"createdAt": "创建时间",
@@ -193,7 +204,7 @@
"filterColumns": "筛选表格列",
"filterReset_one": "重置筛选",
"filterReset_other": "重置筛选",
- "from": "从",
+ "from": "开始时间",
"maxActiveRuns": "最大活跃执行数",
"noTagsFound": "找不到标签",
"tagMode": {
@@ -201,7 +212,7 @@
"any": "任何"
},
"tagPlaceholder": "按标签筛选",
- "to": "到"
+ "to": "结束时间"
},
"task": {
"documentation": "任务文档",
diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/dag.json b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/dag.json
index 100cdc41be5..6f9a498f7a2 100644
--- a/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/dag.json
+++ b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/dag.json
@@ -35,6 +35,7 @@
"code": {
"bundleUrl": "套件包链接",
"noCode": "找不到代码",
+ "parseDuration": "解析耗时:",
"parsedAt": "解析时间:"
},
"extraLinks": "额外链接",
@@ -84,6 +85,8 @@
"assetEvent_other": "已创建资源事件"
},
"failedLogs": {
+ "hideLogs": "隐藏日志",
+ "showLogs": "显示日志",
"title": "最近失败任务的日志",
"viewFullLogs": "查看完整日志"
}
diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/dags.json b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/dags.json
index b4537e28e69..b8e4f0929d4 100644
--- a/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/dags.json
+++ b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/dags.json
@@ -16,7 +16,7 @@
"unfavorite": "未加入收藏"
},
"paused": {
- "active": "启用中",
+ "active": "已启用",
"all": "全部",
"paused": "暂停"
},
diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/dashboard.json b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/dashboard.json
index cf811012353..89022de3eb7 100644
--- a/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/dashboard.json
+++ b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/dashboard.json
@@ -33,10 +33,10 @@
},
"source": "来源",
"stats": {
- "activeDags": "启用中的 Dags",
+ "activeDags": "已启用的 Dags",
"failedDags": "失败的 Dags",
"queuedDags": "排队的 Dags",
- "requiredActions": "待响应的任务实例",
+ "requiredActions": "待操作的任务实例",
"runningDags": "执行中的 Dags",
"stats": "统计"
},
diff --git a/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/hitl.json b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/hitl.json
index ef0d75ecba8..0c4cc910c60 100644
--- a/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/hitl.json
+++ b/airflow-core/src/airflow/ui/public/i18n/locales/zh-CN/hitl.json
@@ -6,9 +6,11 @@
"received": "已响应"
}
},
- "requiredAction_one": "待响应的任务实例",
- "requiredAction_other": "待响应的任务实例",
- "requiredActionState": "待响应的任务实例状态",
+ "requiredAction_one": "待操作的任务实例",
+ "requiredAction_other": "待操作的任务实例",
+ "requiredActionCount_one": "待操作的任务实例 ({{count}})",
+ "requiredActionCount_other": "待操作的任务实例 ({{count}})",
+ "requiredActionState": "待操作的任务实例状态",
"response": {
"error": "响应失败",
"optionsDescription": "请为此任务实例选择一个选项",
@@ -23,6 +25,7 @@
"approvalRequired": "需要批准",
"choiceReceived": "已选择",
"choiceRequired": "需要选择",
+ "noResponseReceived": "未收到响应",
"rejectionReceived": "已拒绝",
"responseReceived": "已响应",
"responseRequired": "需要响应"
(airflow) 04/04: Update 3.1.0 release notes based on latest cherry-picks
Posted by ka...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 60776eafcec0514d9108e45255c52cb3c705b4ed
Author: Kaxil Naik <ka...@apache.org>
AuthorDate: Fri Sep 19 15:15:41 2025 +0100
Update 3.1.0 release notes based on latest cherry-picks
---
RELEASE_NOTES.rst | 8 ++++++--
reproducible_build.yaml | 4 ++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst
index b47a4f69b36..5c4011d1436 100644
--- a/RELEASE_NOTES.rst
+++ b/RELEASE_NOTES.rst
@@ -24,8 +24,8 @@
.. towncrier release notes start
-Airflow 3.1.0b2 (2025-09-15)
-----------------------------
+Airflow 3.1.0 (2025-09-24)
+--------------------------
Significant Changes
^^^^^^^^^^^^^^^^^^^
@@ -484,6 +484,10 @@ Bug Fixes
- Fix logging format to respect existing configuration during upgrade to prevent unexpected log format changes (#55824)
- Fix Grid view crashes when DAG version information is missing (#55771)
- Fix compatibility for custom triggers migrating from Airflow 2.x that use synchronous connection calls (#55799)
+- Fix DAG runs triggered from UI incorrectly marked as REST API triggers instead of UI triggers (#54650)
+- Fix XCom API responses failing when encountering non-serializable objects by falling back to string representation (#55880)
+- Fix asset queue display in UI showing incorrect timestamps for deleted queue events (#54652)
+- Fix SQLite database migrations failing due to foreign key constraint handling (#55883)
Miscellaneous
^^^^^^^^^^^^^
diff --git a/reproducible_build.yaml b/reproducible_build.yaml
index 7530ee915bf..9e557a1c516 100644
--- a/reproducible_build.yaml
+++ b/reproducible_build.yaml
@@ -1,2 +1,2 @@
-release-notes-hash: 664400f5323cc38d75012741fc97dd21
-source-date-epoch: 1758226492
+release-notes-hash: 014e8864f21cbfc7805c600b0e6f6e1e
+source-date-epoch: 1758291700
(airflow) 02/04: Fix:added none to lastupdated Date if event is not in queue (#54652)
Posted by ka...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit b5a84c1f6335ede8d4924fae6e1149c74dbce4e6
Author: vikrantkumar-max <vi...@zemosolabs.com>
AuthorDate: Fri Sep 19 19:49:38 2025 +0530
Fix:added none to lastupdated Date if event is not in queue (#54652)
closes: #53817
(cherry picked from commit f9400cc40c7b802509a7ef1093ef8ea9470723d3)
---
.../api_fastapi/core_api/routes/ui/assets.py | 12 +++-
.../api_fastapi/core_api/routes/ui/test_assets.py | 83 ++++++++++++++++++++++
2 files changed, 94 insertions(+), 1 deletion(-)
diff --git a/airflow-core/src/airflow/api_fastapi/core_api/routes/ui/assets.py b/airflow-core/src/airflow/api_fastapi/core_api/routes/ui/assets.py
index ce476d94ffc..a112bec9639 100644
--- a/airflow-core/src/airflow/api_fastapi/core_api/routes/ui/assets.py
+++ b/airflow-core/src/airflow/api_fastapi/core_api/routes/ui/assets.py
@@ -18,7 +18,7 @@
from __future__ import annotations
from fastapi import Depends, HTTPException, status
-from sqlalchemy import and_, func, select
+from sqlalchemy import and_, case, func, select
from airflow.api_fastapi.common.dagbag import DagBagDep
from airflow.api_fastapi.common.db.common import SessionDep
@@ -53,6 +53,12 @@ def next_run_assets(
AssetModel.uri,
AssetModel.name,
func.max(AssetEvent.timestamp).label("lastUpdate"),
+ func.max(
+ case(
+ (AssetDagRunQueue.asset_id.is_not(None), 1),
+ else_=0,
+ )
+ ).label("queued"),
)
.join(DagScheduleAssetReference, DagScheduleAssetReference.asset_id == AssetModel.id)
.join(
@@ -81,5 +87,9 @@ def next_run_assets(
)
]
+ for event in events:
+ if not event.pop("queued", None):
+ event["lastUpdate"] = None
+
data = {"asset_expression": dag_model.asset_expression, "events": events}
return data
diff --git a/airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_assets.py b/airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_assets.py
index a75cadbd6c0..91b70967891 100644
--- a/airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_assets.py
+++ b/airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_assets.py
@@ -18,8 +18,10 @@ from __future__ import annotations
from unittest import mock
+import pendulum
import pytest
+from airflow.models.asset import AssetDagRunQueue, AssetEvent, AssetModel
from airflow.providers.standard.operators.empty import EmptyOperator
from airflow.sdk.definitions.asset import Asset
@@ -74,3 +76,84 @@ class TestNextRunAssets:
def test_should_respond_403(self, unauthorized_test_client):
response = unauthorized_test_client.get("/next_run_assets/upstream")
assert response.status_code == 403
+
+ def test_should_set_last_update_only_for_queued_and_hide_flag(self, test_client, dag_maker, session):
+ with dag_maker(
+ dag_id="two_assets_equal",
+ schedule=[
+ Asset(uri="s3://bucket/A", name="A"),
+ Asset(uri="s3://bucket/B", name="B"),
+ ],
+ serialized=True,
+ ):
+ EmptyOperator(task_id="t")
+
+ dr = dag_maker.create_dagrun()
+ dag_maker.sync_dagbag_to_db()
+
+ assets = {
+ a.uri: a
+ for a in session.query(AssetModel).filter(AssetModel.uri.in_(["s3://bucket/A", "s3://bucket/B"]))
+ }
+ # Queue and add an event only for A
+ session.add(AssetDagRunQueue(asset_id=assets["s3://bucket/A"].id, target_dag_id="two_assets_equal"))
+ session.add(
+ AssetEvent(asset_id=assets["s3://bucket/A"].id, timestamp=dr.logical_date or pendulum.now())
+ )
+ session.commit()
+
+ response = test_client.get("/next_run_assets/two_assets_equal")
+ assert response.status_code == 200
+ assert response.json() == {
+ "asset_expression": {
+ "all": [
+ {
+ "asset": {
+ "uri": "s3://bucket/A",
+ "name": "A",
+ "group": "asset",
+ "id": mock.ANY,
+ }
+ },
+ {
+ "asset": {
+ "uri": "s3://bucket/B",
+ "name": "B",
+ "group": "asset",
+ "id": mock.ANY,
+ }
+ },
+ ]
+ },
+ # events are ordered by uri
+ "events": [
+ {"id": mock.ANY, "uri": "s3://bucket/A", "name": "A", "lastUpdate": mock.ANY},
+ {"id": mock.ANY, "uri": "s3://bucket/B", "name": "B", "lastUpdate": None},
+ ],
+ }
+
+ def test_last_update_respects_latest_run_filter(self, test_client, dag_maker, session):
+ with dag_maker(
+ dag_id="filter_run",
+ schedule=[Asset(uri="s3://bucket/F", name="F")],
+ serialized=True,
+ ):
+ EmptyOperator(task_id="t")
+
+ dr = dag_maker.create_dagrun()
+ dag_maker.sync_dagbag_to_db()
+
+ asset = session.query(AssetModel).filter(AssetModel.uri == "s3://bucket/F").one()
+ session.add(AssetDagRunQueue(asset_id=asset.id, target_dag_id="filter_run"))
+ # event before latest_run should be ignored
+ ts_base = dr.logical_date or pendulum.now()
+ session.add(AssetEvent(asset_id=asset.id, timestamp=ts_base.subtract(minutes=10)))
+ # event after latest_run counts
+ session.add(AssetEvent(asset_id=asset.id, timestamp=ts_base.add(minutes=10)))
+ session.commit()
+
+ resp = test_client.get("/next_run_assets/filter_run")
+ assert resp.status_code == 200
+ ev = resp.json()["events"][0]
+ assert ev["lastUpdate"] is not None
+ assert "queued" not in ev
(airflow) 01/04: Fix migrations for sqlite (#55883)
Posted by ka...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 49ef1bdb058e71890f896c74549ac64a4f18cd5c
Author: Rahul Vats <43...@users.noreply.github.com>
AuthorDate: Fri Sep 19 19:34:04 2025 +0530
Fix migrations for sqlite (#55883)
(cherry picked from commit 7e074f5542a8c02dab190b43ec9d4121b1d209bc)
---
airflow-core/docs/img/airflow_erd.sha256 | 2 +-
.../versions/0041_3_0_0_rename_dataset_as_asset.py | 12 +++++++++---
.../0084_3_1_0_add_last_parse_duration_to_dag_model.py | 15 +++++++++++++--
3 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/airflow-core/docs/img/airflow_erd.sha256 b/airflow-core/docs/img/airflow_erd.sha256
index bf88ae1d3c4..9274a23fed6 100644
--- a/airflow-core/docs/img/airflow_erd.sha256
+++ b/airflow-core/docs/img/airflow_erd.sha256
@@ -1 +1 @@
-35b8a7f30e44075373199a53e6634693f4254287a9ecff0582d9ae926fc7aaae
\ No newline at end of file
+b4de080500173a0c42be078718a969867ae00a5ffd4c68e18d7bacb7e5bb7fd1
\ No newline at end of file
diff --git a/airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py b/airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py
index 4d00f66c490..abe776f082b 100644
--- a/airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py
+++ b/airflow-core/src/airflow/migrations/versions/0041_3_0_0_rename_dataset_as_asset.py
@@ -31,6 +31,7 @@ from typing import TYPE_CHECKING
import sqlalchemy as sa
import sqlalchemy_jsonfield
from alembic import op
+from sqlalchemy import text
from airflow.migrations.utils import mysql_drop_foreignkey_if_exists
from airflow.settings import json
@@ -101,14 +102,19 @@ def _rename_pk_constraint(
def _drop_fkey_if_exists(table, constraint_name):
- dialect = op.get_bind().dialect.name
- if dialect == "sqlite":
+ conn = op.get_bind()
+ dialect_name = conn.dialect.name
+
+ if dialect_name == "sqlite":
+ # SQLite requires foreign key constraints to be disabled during batch operations
+ conn.execute(text("PRAGMA foreign_keys=OFF"))
try:
with op.batch_alter_table(table, schema=None) as batch_op:
batch_op.drop_constraint(op.f(constraint_name), type_="foreignkey")
except ValueError:
pass
- elif dialect == "mysql":
+ conn.execute(text("PRAGMA foreign_keys=ON"))
+ elif dialect_name == "mysql":
mysql_drop_foreignkey_if_exists(constraint_name, table, op)
else:
op.execute(f"ALTER TABLE {table} DROP CONSTRAINT IF EXISTS {constraint_name}")
diff --git a/airflow-core/src/airflow/migrations/versions/0084_3_1_0_add_last_parse_duration_to_dag_model.py b/airflow-core/src/airflow/migrations/versions/0084_3_1_0_add_last_parse_duration_to_dag_model.py
index 2fd90d631e8..1a922d97dee 100644
--- a/airflow-core/src/airflow/migrations/versions/0084_3_1_0_add_last_parse_duration_to_dag_model.py
+++ b/airflow-core/src/airflow/migrations/versions/0084_3_1_0_add_last_parse_duration_to_dag_model.py
@@ -29,6 +29,7 @@ from __future__ import annotations
import sqlalchemy as sa
from alembic import op
+from sqlalchemy import text
# revision identifiers, used by Alembic.
revision = "eaf332f43c7c"
@@ -46,5 +47,15 @@ def upgrade():
def downgrade():
"""Unapply add last_parse_duration to dag model."""
- with op.batch_alter_table("dag", schema=None) as batch_op:
- batch_op.drop_column("last_parse_duration")
+ conn = op.get_bind()
+ dialect_name = conn.dialect.name
+
+ if dialect_name == "sqlite":
+ # SQLite requires foreign key constraints to be disabled during batch operations
+ conn.execute(text("PRAGMA foreign_keys=OFF"))
+ with op.batch_alter_table("dag", schema=None) as batch_op:
+ batch_op.drop_column("last_parse_duration")
+ conn.execute(text("PRAGMA foreign_keys=ON"))
+ else:
+ with op.batch_alter_table("dag", schema=None) as batch_op:
+ batch_op.drop_column("last_parse_duration")