"""add unique constraint routes game name

Revision ID: 694df688fb02
Revises: 03e5f186a9d5
Create Date: 2026-02-05 13:01:30.631978

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '694df688fb02'
down_revision: Union[str, Sequence[str], None] = '03e5f186a9d5'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    """Upgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_unique_constraint('uq_routes_game_name', 'routes', ['game_id', 'name'])
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint('uq_routes_game_name', 'routes', type_='unique')
    # ### end Alembic commands ###
