"""Added status, count, and completed fields to rfp

Revision ID: 7eb566cf9534
Revises: 9b8000cad5e7
Create Date: 2026-02-04 16:01:22.477974

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '7eb566cf9534'
down_revision: Union[str, Sequence[str], None] = '9b8000cad5e7'
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.add_column('rfp', sa.Column('total_questions', sa.Integer(), nullable=False))
    op.add_column('rfp', sa.Column('answered_questions', sa.Integer(), nullable=False))
    op.add_column('rfp', sa.Column('status', sa.Enum('PENDING', 'PROCESSING', 'COMPLETED', 'FAILED', name='rfpstatus', native_enum=False), nullable=False))
    op.create_index(op.f('rfp_status_idx'), 'rfp', ['status'], unique=False)
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('rfp_status_idx'), table_name='rfp')
    op.drop_column('rfp', 'status')
    op.drop_column('rfp', 'answered_questions')
    op.drop_column('rfp', 'total_questions')
    # ### end Alembic commands ###
