ephraimbuddy commented on code in PR #36737:
URL: https://github.com/apache/airflow/pull/36737#discussion_r1449943849
##########
airflow/migrations/versions/0126_2_7_0_add_index_to_task_instance_table.py:
##########
@@ -37,14 +37,16 @@
def upgrade():
"""Apply Add index to task_instance table"""
- op.create_index(
- "ti_state_incl_start_date",
- "task_instance",
- ["dag_id", "task_id", "state"],
- postgresql_include=["start_date"],
- )
+ # We don't add this index anymore because it's not useful.
+ pass
def downgrade():
"""Unapply Add index to task_instance table"""
- op.drop_index("ti_state_incl_start_date", table_name="task_instance")
+ # At 2.9 we removed this index as it is not used, and changed this
migration not to add it
+ # So we use drop if exists (cus it might not be there)
Review Comment:
Why move this to 2.9? this seems like a bug fix
--
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]