"""widen ai_sessions status to varchar 30

Revision ID: f0aad74ea51b
Revises: b8d2f4a6c091
Create Date: 2026-03-21 01:21:03.742028

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = 'f0aad74ea51b'
down_revision: Union[str, None] = 'b8d2f4a6c091'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    op.alter_column(
        "ai_sessions", "status",
        type_=sa.String(30),
        existing_type=sa.String(20),
        existing_nullable=False,
    )


def downgrade() -> None:
    op.alter_column(
        "ai_sessions", "status",
        type_=sa.String(20),
        existing_type=sa.String(30),
        existing_nullable=False,
    )
