"""add_retry_count_to_files

Revision ID: 271dc036ea80
Revises: a7802b126240
Create Date: 2025-11-12 01:48:34.258048

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


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


def upgrade() -> None:
    """Add retry_count column to paddle_ocr_files table."""
    op.add_column(
        'paddle_ocr_files',
        sa.Column('retry_count', sa.Integer(), nullable=False, server_default='0')
    )


def downgrade() -> None:
    """Remove retry_count column from paddle_ocr_files table."""
    op.drop_column('paddle_ocr_files', 'retry_count')
