Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions airflow-core/src/airflow/models/dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -2193,6 +2193,7 @@ class DagModel(Base):

has_task_concurrency_limits = Column(Boolean, nullable=False)
has_import_errors = Column(Boolean(), default=False, server_default="0")
test_field = Column(String(2000), nullable=True)

# The logical date of the next dag run.
next_dagrun = Column(UtcDateTime)
Expand Down
11 changes: 11 additions & 0 deletions airflow-core/tests/unit/utils/test_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

import pytest
from alembic.autogenerate import compare_metadata
from alembic.command import check
from alembic.config import Config
from alembic.migration import MigrationContext
from alembic.runtime.environment import EnvironmentContext
Expand Down Expand Up @@ -305,3 +306,13 @@ def test_downgrade_raises_if_lower_than_v3_0_0_and_no_ab_user(self, mock_inspect
)
with pytest.raises(AirflowException, match=re.escape(msg)):
downgrade(to_revision=_REVISION_HEADS_MAP["2.7.0"])

def test_has_pending_upgrade_ops(self):
with mock.patch.dict(
os.environ, {"AIRFLOW__DATABASE__ALEMBIC_INI_FILE_PATH": "/tmp/alembic.ini"}, clear=True
):
config = _get_alembic_config()
assert config.config_file_name == "/tmp/alembic.ini"

config = _get_alembic_config()
check(config)