diff --git a/airflow-core/docs/img/airflow_erd.sha256 b/airflow-core/docs/img/airflow_erd.sha256 index 51c2117fd5b1b..b5e4372a35254 100644 --- a/airflow-core/docs/img/airflow_erd.sha256 +++ b/airflow-core/docs/img/airflow_erd.sha256 @@ -1 +1 @@ -173317aa67c36d8a257bc31c99eeedf906390cebdd9c6941d6e9c3db0515d5c5 \ No newline at end of file +71743446a269a520d2a6a9511eff99d7fc8c4b0409ba58b4bc3b2e1fee195774 \ No newline at end of file diff --git a/airflow-core/src/airflow/migrations/versions/0047_3_0_0_add_dag_versioning.py b/airflow-core/src/airflow/migrations/versions/0047_3_0_0_add_dag_versioning.py index e411c8f43c8b7..2cad82e1e7f63 100644 --- a/airflow-core/src/airflow/migrations/versions/0047_3_0_0_add_dag_versioning.py +++ b/airflow-core/src/airflow/migrations/versions/0047_3_0_0_add_dag_versioning.py @@ -71,8 +71,11 @@ def upgrade(): sa.PrimaryKeyConstraint("id", name=op.f("dag_version_pkey")), sa.UniqueConstraint("dag_id", "version_number", name="dag_id_v_name_v_number_unique_constraint"), ) + with ignore_sqlite_value_error(), op.batch_alter_table("dag_code") as batch_op: batch_op.drop_constraint("dag_code_pkey", type_="primary") + + with op.batch_alter_table("dag_code") as batch_op: batch_op.drop_column("fileloc_hash") batch_op.add_column(sa.Column("id", UUIDType(binary=False), nullable=False)) batch_op.create_primary_key("dag_code_pkey", ["id"]) @@ -91,6 +94,8 @@ def upgrade(): with ignore_sqlite_value_error(), op.batch_alter_table("serialized_dag") as batch_op: batch_op.drop_constraint("serialized_dag_pkey", type_="primary") + + with op.batch_alter_table("serialized_dag") as batch_op: batch_op.drop_index("idx_fileloc_hash") batch_op.drop_column("fileloc_hash") batch_op.drop_column("fileloc")