eladkal commented on code in PR #54242:
URL: https://github.com/apache/airflow/pull/54242#discussion_r2347091088
##########
airflow-core/src/airflow/migrations/versions/0068_3_0_0_ti_table_id_unique_per_try.py:
##########
@@ -113,9 +122,13 @@ def downgrade():
existing_nullable=False,
)
batch_op.drop_index("idx_tih_dag_run")
+
# This has to be in a separate batch, else on sqlite it throws
`sqlalchemy.exc.CircularDependencyError`
# (and on non sqlite batching isn't "a thing", it issue alter tables fine)
with op.batch_alter_table("task_instance_history", schema=None) as
batch_op:
- batch_op.add_column(
- sa.Column("task_instance_id", UUIDType(binary=False),
autoincrement=False, nullable=True)
+ batch_op.alter_column(
+ "task_instance_id_backup",
+ new_column_name="task_instance_id",
+ existing_type=_get_uuid_type(dialect_name),
+ existing_nullable=False,
Review Comment:
@ephraimbuddy generally speaking that is not a scenario we can protect. Can
we? When you downgrade to backup you are aware that work done since upgrade may
be lost/corrupted and you make manual adjustments/checks to verify the
workflows ran during that period.
--
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]