__table_args__ = (
        Index("ti_dag_state", dag_id, state),
        Index("ti_dag_run", dag_id, run_id),
        Index("ti_state", state),
        Index("ti_state_lkp", dag_id, task_id, run_id, state),
        
        
        
        
        
        
        
        
        Index("ti_state_incl_start_date", dag_id, task_id, state, postgresql_include=["start_date"]),
        Index("ti_pool", pool, state, priority_weight),
        Index("ti_job_id", job_id),
        Index("ti_trigger_id", trigger_id),
        PrimaryKeyConstraint(
            "dag_id", "task_id", "run_id", "map_index", name="task_instance_pkey", mssql_clustered=True
        ),
        ForeignKeyConstraint(
            [trigger_id],
            ["trigger.id"],
            name="task_instance_trigger_id_fkey",
            ondelete="CASCADE",
        ),
        ForeignKeyConstraint(
            [dag_id, run_id],
            ["dag_run.dag_id", "dag_run.run_id"],
            name="task_instance_dag_run_fkey",