This is an automated email from the ASF dual-hosted git repository.
ephraimanierobi 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 d4585543477 Fix db downgrade check condition (#52982)
d4585543477 is described below
commit d4585543477835e0c33aadbd64789d60e787390e
Author: Rahul Vats <[email protected]>
AuthorDate: Tue Jul 8 13:39:05 2025 +0530
Fix db downgrade check condition (#52982)
* 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
---
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 c93d84433bd..56857562627 100644
--- a/airflow-core/src/airflow/utils/db.py
+++ b/airflow-core/src/airflow/utils/db.py
@@ -1055,7 +1055,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: