diff --git a/airflow-core/docs/img/airflow_erd.sha256 b/airflow-core/docs/img/airflow_erd.sha256 index d7bbf4bb8c209..7536fe31e5c48 100644 --- a/airflow-core/docs/img/airflow_erd.sha256 +++ b/airflow-core/docs/img/airflow_erd.sha256 @@ -1 +1 @@ -ba7271a819353797fae12c105853ef4d30d0029ca705f5611577496e20e1234f \ No newline at end of file +416f82950da2cdf798668327085607268f1c3ebfe5c6b5e22356e370936624fb \ No newline at end of file diff --git a/airflow-core/docs/migrations-ref.rst b/airflow-core/docs/migrations-ref.rst index 2f35cf2deecf4..af3ec9a4a90b2 100644 --- a/airflow-core/docs/migrations-ref.rst +++ b/airflow-core/docs/migrations-ref.rst @@ -39,7 +39,9 @@ Here's the list of all the Database Migrations that are executed via when you ru +-------------------------+------------------+-------------------+--------------------------------------------------------------+ | Revision ID | Revises ID | Airflow Version | Description | +=========================+==================+===================+==============================================================+ -| ``29ce7909c52b`` (head) | ``959e216a3abb`` | ``3.0.0`` | Change TI table to have unique UUID id/pk per attempt. | +| ``fe199e1abd77`` (head) | ``29ce7909c52b`` | ``3.0.3`` | Delete import errors. | ++-------------------------+------------------+-------------------+--------------------------------------------------------------+ +| ``29ce7909c52b`` | ``959e216a3abb`` | ``3.0.0`` | Change TI table to have unique UUID id/pk per attempt. | +-------------------------+------------------+-------------------+--------------------------------------------------------------+ | ``959e216a3abb`` | ``0e9519b56710`` | ``3.0.0`` | Rename ``is_active`` to ``is_stale`` column in ``dag`` | | | | | table. | diff --git a/airflow-core/src/airflow/migrations/versions/0069_3_0_3_delete_import_errors.py b/airflow-core/src/airflow/migrations/versions/0069_3_0_3_delete_import_errors.py new file mode 100644 index 0000000000000..c0f267b97b9d7 --- /dev/null +++ b/airflow-core/src/airflow/migrations/versions/0069_3_0_3_delete_import_errors.py @@ -0,0 +1,50 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +""" +Delete import errors. + +Revision ID: fe199e1abd77 +Revises: 29ce7909c52b +Create Date: 2025-06-10 08:53:28.782896 + +""" + +from __future__ import annotations + +import sqlalchemy as sa +from alembic import op + +# revision identifiers, used by Alembic. +revision = "fe199e1abd77" +down_revision = "29ce7909c52b" +branch_labels = None +depends_on = None + +airflow_version = "3.0.3" + + +def upgrade(): + """Apply Delete import errors.""" + # delete import_error table rows + op.get_bind().execute(sa.text("DELETE FROM import_error")) + + +def downgrade(): + """Unapply Delete import errors.""" + pass diff --git a/airflow-core/src/airflow/utils/db.py b/airflow-core/src/airflow/utils/db.py index c492a50847311..4ab7226fcb487 100644 --- a/airflow-core/src/airflow/utils/db.py +++ b/airflow-core/src/airflow/utils/db.py @@ -93,6 +93,7 @@ class MappedClassProtocol(Protocol): "2.10.0": "22ed7efa9da2", "2.10.3": "5f2621c13b39", "3.0.0": "29ce7909c52b", + "3.0.3": "fe199e1abd77", }