"""make_repo_id_nullable

Revision ID: 8473b83ba7a7
Revises: 65900af1312b
Create Date: 2026-03-21 00:46:04.456225

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '8473b83ba7a7'
down_revision: Union[str, None] = '65900af1312b'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('chat_sessions', 'repo_id',
               existing_type=sa.UUID(),
               nullable=True)
    op.alter_column('turn_events', 'repo_id',
               existing_type=sa.UUID(),
               nullable=True)
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('turn_events', 'repo_id',
               existing_type=sa.UUID(),
               nullable=False)
    op.alter_column('chat_sessions', 'repo_id',
               existing_type=sa.UUID(),
               nullable=False)
    # ### end Alembic commands ###
