diff --git a/airflow-core/docs/img/airflow_erd.sha256 b/airflow-core/docs/img/airflow_erd.sha256 index b5e4372a35254..86f013f2090d4 100644 --- a/airflow-core/docs/img/airflow_erd.sha256 +++ b/airflow-core/docs/img/airflow_erd.sha256 @@ -1 +1 @@ -71743446a269a520d2a6a9511eff99d7fc8c4b0409ba58b4bc3b2e1fee195774 \ No newline at end of file +2732a5f7846dd279440b101904898d683a22c27fdecccba1c99ff9cbbc0e59e3 \ No newline at end of file diff --git a/airflow-core/docs/migrations-ref.rst b/airflow-core/docs/migrations-ref.rst index 43e008532a533..f4462ab727366 100644 --- a/airflow-core/docs/migrations-ref.rst +++ b/airflow-core/docs/migrations-ref.rst @@ -46,7 +46,9 @@ Here's the list of all the Database Migrations that are executed via when you ru | ``0242ac120002`` | ``dfee8bd5d574`` | ``3.1.0`` | Change the Deadline column in the Deadline table from | | | | | DateTime to UTC DateTime. | +-------------------------+------------------+-------------------+--------------------------------------------------------------+ -| ``dfee8bd5d574`` | ``29ce7909c52b`` | ``3.1.0`` | Add Deadline to Dag. | +| ``dfee8bd5d574`` | ``fe199e1abd77`` | ``3.1.0`` | Add Deadline to Dag. | ++-------------------------+------------------+-------------------+--------------------------------------------------------------+ +| ``fe199e1abd77`` | ``29ce7909c52b`` | ``3.0.3`` | Delete import errors. | +-------------------------+------------------+-------------------+--------------------------------------------------------------+ | ``29ce7909c52b`` | ``959e216a3abb`` | ``3.0.0`` | Change TI table to have unique UUID id/pk per attempt. | +-------------------------+------------------+-------------------+--------------------------------------------------------------+ diff --git a/airflow-core/src/airflow/migrations/versions/0050_3_0_0_add_dagbundlemodel.py b/airflow-core/src/airflow/migrations/versions/0050_3_0_0_add_dagbundlemodel.py index 786bd6eb7d091..74485df9f14e7 100644 --- a/airflow-core/src/airflow/migrations/versions/0050_3_0_0_add_dagbundlemodel.py +++ b/airflow-core/src/airflow/migrations/versions/0050_3_0_0_add_dagbundlemodel.py @@ -63,8 +63,6 @@ def upgrade(): with op.batch_alter_table("dag_version", schema=None) as batch_op: batch_op.add_column(sa.Column("bundle_name", StringID())) batch_op.add_column(sa.Column("bundle_version", StringID())) - # delete import_error table rows - op.get_bind().execute(sa.text("DELETE FROM import_error")) def downgrade(): 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/migrations/versions/0069_3_1_0_add_deadline_to_dag.py b/airflow-core/src/airflow/migrations/versions/0070_3_1_0_add_deadline_to_dag.py similarity index 96% rename from airflow-core/src/airflow/migrations/versions/0069_3_1_0_add_deadline_to_dag.py rename to airflow-core/src/airflow/migrations/versions/0070_3_1_0_add_deadline_to_dag.py index c82bc33cfb20e..470d9f157bb37 100644 --- a/airflow-core/src/airflow/migrations/versions/0069_3_1_0_add_deadline_to_dag.py +++ b/airflow-core/src/airflow/migrations/versions/0070_3_1_0_add_deadline_to_dag.py @@ -20,7 +20,7 @@ Add Deadline to Dag. Revision ID: dfee8bd5d574 -Revises: 29ce7909c52b +Revises: fe199e1abd77 Create Date: 2024-12-18 19:10:26.962464 """ @@ -33,7 +33,7 @@ from airflow.settings import json revision = "dfee8bd5d574" -down_revision = "29ce7909c52b" +down_revision = "fe199e1abd77" branch_labels = None depends_on = None airflow_version = "3.1.0" diff --git a/airflow-core/src/airflow/migrations/versions/0070_3_1_0_change_deadline_to_utc.py b/airflow-core/src/airflow/migrations/versions/0071_3_1_0_change_deadline_to_utc.py similarity index 100% rename from airflow-core/src/airflow/migrations/versions/0070_3_1_0_change_deadline_to_utc.py rename to airflow-core/src/airflow/migrations/versions/0071_3_1_0_change_deadline_to_utc.py diff --git a/airflow-core/src/airflow/migrations/versions/0071_3_1_0_change_ti_dag_version_fk_to_restrict.py b/airflow-core/src/airflow/migrations/versions/0072_3_1_0_change_ti_dag_version_fk_to_restrict.py similarity index 100% rename from airflow-core/src/airflow/migrations/versions/0071_3_1_0_change_ti_dag_version_fk_to_restrict.py rename to airflow-core/src/airflow/migrations/versions/0072_3_1_0_change_ti_dag_version_fk_to_restrict.py diff --git a/airflow-core/src/airflow/utils/db.py b/airflow-core/src/airflow/utils/db.py index 25dbecf5d5b54..3364c3d70b838 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", "3.1.0": "3ac9e5732b1f", }