gdivya6028 commented on code in PR #68785:
URL: https://github.com/apache/airflow/pull/68785#discussion_r3507179978
##########
airflow-core/src/airflow/migrations/versions/a1f939e903c3_add_new_field_to_db.py:
##########
@@ -16,39 +16,38 @@
# specific language governing permissions and limitations
# under the License.
-"""
-Add partition_date to asset_partition_dag_run.
-
-The target datetime is frozen at APDR creation time so the consumer DagRun's
-``partition_date`` is consistent with the partition mapper that produced its
-``partition_key``.
+"""add new field to db
-Revision ID: d2f4e1b3c5a7
+Revision ID: a1f939e903c3
Revises: 9ff64e1c35d3
-Create Date: 2026-05-21 09:00:00.000000
-"""
+Create Date: 2026-06-26 04:45:59.320339
-from __future__ import annotations
+"""
import sqlalchemy as sa
from alembic import op
-from airflow.utils.sqlalchemy import UtcDateTime
-revision = "d2f4e1b3c5a7"
+# revision identifiers, used by Alembic.
+revision = "a1f939e903c3"
down_revision = "9ff64e1c35d3"
branch_labels = None
depends_on = None
-airflow_version = "3.3.0"
def upgrade():
- """Add partition_date column to asset_partition_dag_run."""
- with op.batch_alter_table("asset_partition_dag_run", schema=None) as
batch_op:
- batch_op.add_column(sa.Column("partition_date", UtcDateTime,
nullable=True))
+ """Apply add new field to db"""
+ # ### commands auto generated by Alembic - please adjust! ###
+ with op.batch_alter_table('dag_run', schema=None) as batch_op:
+ batch_op.add_column(sa.Column('tags', sa.String(length=512),
nullable=True))
+
+ # ### end Alembic commands ###
def downgrade():
- """Remove partition_date column from asset_partition_dag_run."""
- with op.batch_alter_table("asset_partition_dag_run", schema=None) as
batch_op:
- batch_op.drop_column("partition_date")
+ """Unapply add new field to db"""
+ # ### commands auto generated by Alembic - please adjust! ###
+ with op.batch_alter_table('dag_run', schema=None) as batch_op:
+ batch_op.drop_column('tags')
+
+ # ### end Alembic commands ###
Review Comment:
this PR is still a WIP @pierrejeambrun .. i added this column for testing
few queries in local, i shouldn't have committed it. could you please reopen
this PR, so i can move it to draft.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]