"""Track currently processing crawl page.

Revision ID: 0013_add_crawl_job_current_page
Revises: 0012_add_target_interval_jitter
Create Date: 2026-05-09
"""
from alembic import op
import sqlalchemy as sa


revision = "0013_add_crawl_job_current_page"
down_revision = "0012_add_target_interval_jitter"
branch_labels = None
depends_on = None


def upgrade() -> None:
    op.add_column(
        "crawl_job",
        sa.Column(
            "current_page", sa.Integer,
            server_default=sa.text("0"), nullable=False,
        ),
    )


def downgrade() -> None:
    op.drop_column("crawl_job", "current_page")
