"""Allow null player1_id in game_history

Revision ID: ab8a0039fe55
Revises: 7ac994d6f89c
Create Date: 2026-01-27 09:47:41.539989

"""

from collections.abc import Sequence

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision: str = "ab8a0039fe55"
down_revision: str | Sequence[str] | None = "7ac994d6f89c"
branch_labels: str | Sequence[str] | None = None
depends_on: str | Sequence[str] | None = None


def upgrade() -> None:
    """Upgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column("game_history", "player1_id", existing_type=sa.UUID(), nullable=True)
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column("game_history", "player1_id", existing_type=sa.UUID(), nullable=False)
    # ### end Alembic commands ###
