This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch v3-0-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit a2fe830ec457c405ca4703d2d02177b4f00748ed
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Jul 8 11:33:51 2025 +0200
[v3-0-test] Fix db downgrade check condition (#52982) (#53005)
* fix rollback from airflow3
* use fab for test
* amend
* fix test
* revert condition fix and add shortcut if revisions are same
* updating revision to 2.10.3 in condition
* remove fab from tests
(cherry picked from commit d4585543477835e0c33aadbd64789d60e787390e)
Co-authored-by: Rahul Vats <[email protected]>
---
airflow-core/src/airflow/utils/db.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/airflow-core/src/airflow/utils/db.py
b/airflow-core/src/airflow/utils/db.py
index 4ab7226fcb4..f091f0868b0 100644
--- a/airflow-core/src/airflow/utils/db.py
+++ b/airflow-core/src/airflow/utils/db.py
@@ -1210,7 +1210,7 @@ def downgrade(*, to_revision, from_revision=None,
show_sql_only=False, session:
log.info("Attempting downgrade to revision %s", to_revision)
config = _get_alembic_config()
# Check if downgrade is less than 3.0.0 and requires that `ab_user` fab
table is present
- if _revision_greater(config, _REVISION_HEADS_MAP["3.0.0"], to_revision):
+ if _revision_greater(config, _REVISION_HEADS_MAP["2.10.3"], to_revision):
unitest_mode = conf.getboolean("core", "unit_test_mode")
if unitest_mode:
try: