code: def downgrade():
      """Reverse MSSQL backend compatibility improvements"""
      conn = op.get_bind()
      if conn.dialect.name != "mssql":
          return
      op.alter_column(
          table_name="xcom",
          column_name="timestamp",
          type_=TIMESTAMP,
          nullable=True,
      )
      with op.batch_alter_table(
          "task_reschedule"
      ) as task_reschedule_batch_op:
          task_reschedule_batch_op.alter_column(
              column_name="end_date", type_=TIMESTAMP, nullable=True
          )
          task_reschedule_batch_op.alter_column(
              column_name="reschedule_date",
              type_=TIMESTAMP,
              nullable=True,
          )
          task_reschedule_batch_op.alter_column(
              column_name="start_date", type_=TIMESTAMP, nullable=True
          )
      with op.batch_alter_table("task_fail") as task_fail_batch_op:
          task_fail_batch_op.drop_index("idx_task_fail_dag_task_date")
          task_fail_batch_op.alter_column(
              column_name="execution_date",
              type_=TIMESTAMP,
              nullable=False,
          )
          task_fail_batch_op.create_index(
              "idx_task_fail_dag_task_date",
              ["dag_id", "task_id", "execution_date"],
              unique=False,
          )
      with op.batch_alter_table(
          "task_instance"
      ) as task_instance_batch_op:
          task_instance_batch_op.drop_index("ti_state_lkp")
          task_instance_batch_op.create_index(
              "ti_state_lkp",
              ["dag_id", "task_id", "execution_date"],
              unique=False,
          )
      op.create_unique_constraint(
          "UQ__dag_run__dag_id_run_id", "dag_run", ["dag_id", "run_id"]
      )
      op.create_unique_constraint(
          "UQ__dag_run__dag_id_execution_date",
          "dag_run",
          ["dag_id", "execution_date"],
      )
      op.drop_index(
          "idx_not_null_dag_id_execution_date", table_name="dag_run"
      )
      op.drop_index("idx_not_null_dag_id_run_id", table_name="dag_run")
  
file_path: airflow/airflow/migrations/versions/0088_2_2_0_improve_mssql_compatibility.py
imports: from __future__ import annotations
  from collections import defaultdict
  import sqlalchemy
  from alembic import op
  from sqlalchemy import text
  from sqlalchemy.dialects import mssql
  from airflow.migrations.db_types import TIMESTAMP
label_desc: Use image node_id 9 for calling a global function with example usage: downgrade() without return types