"""Add confidence and match_type to citation_records

Revision ID: b2c4d6e8fa10
Revises: 488d0bd5ab01
Create Date: 2026-04-23 16:10:00.000000

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


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


def upgrade() -> None:
    """Add confidence and match_type columns to citation_records."""
    op.add_column(
        'citation_records',
        sa.Column('confidence', sa.Float(), nullable=True)
    )
    op.add_column(
        'citation_records',
        sa.Column('match_type', sa.String(20), nullable=True)
    )


def downgrade() -> None:
    """Remove confidence and match_type columns from citation_records."""
    op.drop_column('citation_records', 'match_type')
    op.drop_column('citation_records', 'confidence')
