Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add migration for rendered_map_index column in task_instance table. #37708

Merged
merged 3 commits into from
Feb 29, 2024
Merged
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#
# 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.

"""Add rendered_map_index to TaskInstance.

Revision ID: 1fd565369930
Revises: 88344c1d9134
Create Date: 2024-02-26 18:48:06.386776

"""

import sqlalchemy as sa
from alembic import op


# revision identifiers, used by Alembic.
revision = "1fd565369930"
down_revision = "88344c1d9134"
branch_labels = None
depends_on = None
airflow_version = "2.9.0"


def upgrade():
"""Apply Add rendered_map_index to TaskInstance."""
conn = op.get_bind()

with op.batch_alter_table("task_instance") as batch_op:
batch_op.add_column(sa.Column("rendered_map_index", sa.String(length=64), nullable=True))


def downgrade():
"""Unapply Add rendered_map_index to TaskInstance."""
conn = op.get_bind()
with op.batch_alter_table("task_instance", schema=None) as batch_op:
batch_op.drop_column("rendered_map_index")
1 change: 1 addition & 0 deletions airflow/utils/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
"2.7.0": "405de8318b3a",
"2.8.0": "10b52ebd31f7",
"2.8.1": "88344c1d9134",
"2.9.0": "1fd565369930",
}


Expand Down
2 changes: 1 addition & 1 deletion docs/apache-airflow/img/airflow_erd.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
243075d59223245db8034a97c7d6f53bd8a39ee0dc02831229a6ec743c2c920a
798cc78efa225287635e12ec3cebc6025bbb4d8e0b629fb7a17f4c7f168bfc65
Loading