MASTREX commented on code in PR #54242:
URL: https://github.com/apache/airflow/pull/54242#discussion_r2314471603
##########
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:
What my understanding is it would be copied from the backup column
`task_instance_id_backup` so it shouldn't be null
Can you also look at #54071
--
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]