"""add test cases

Revision ID: 003
Revises: 11f3a598b82d
Create Date: 2025-04-12

"""

from collections.abc import Sequence

import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import postgresql

revision: str = "003"
down_revision: str | None = "11f3a598b82d"
branch_labels: str | Sequence[str] | None = None
depends_on: str | Sequence[str] | None = None


def upgrade() -> None:
    op.add_column(
        "questions",
        sa.Column("function_signature", sa.Text(), nullable=True),
    )
    op.add_column(
        "questions",
        sa.Column("test_cases", postgresql.JSONB(astext_type=sa.Text()), nullable=True),
    )


def downgrade() -> None:
    op.drop_column("questions", "test_cases")
    op.drop_column("questions", "function_signature")
