"""add index to assignation table

Revision ID: f45eed2a3ba6
Revises: 35ebb38695cd
Create Date: 2026-01-14 10:53:33.418636

"""

from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils


# revision identifiers, used by Alembic.
revision = "f45eed2a3ba6"
down_revision = "35ebb38695cd"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("task_person_link", schema=None) as batch_op:
        batch_op.create_index(
            batch_op.f("ix_task_person_link_person_id"),
            ["person_id"],
            unique=False,
        )

    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("task_person_link", schema=None) as batch_op:
        batch_op.drop_index(batch_op.f("ix_task_person_link_person_id"))

    # ### end Alembic commands ###
