"""Add index to team table

Revision ID: 014c8f795b84
Revises: 12740baeb469
Create Date: 2026-04-02 19:21:36.519053

"""

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "014c8f795b84"
down_revision = "12740baeb469"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column("team", sa.Column("index", sa.Integer(), nullable=False))
    op.create_unique_constraint("uq_team_index", "team", ["index"])
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint("uq_team_index", "team", type_="unique")
    op.drop_column("team", "index")
    # ### end Alembic commands ###
