"""admin override for the maintenance re-validation batch size Revision ID: 0018_maintenance_batch_setting Revises: 0017_notifications Create Date: 2026-06-18 Adds app_state.maintenance_revalidate_batch: an admin-tunable override (from the Scheduler dashboard) for how many videos the maintenance job re-validates per run. NULL = use the env/config default. Purely additive. """ from typing import Sequence, Union import sqlalchemy as sa from alembic import op revision: str = "0018_maintenance_batch_setting" down_revision: Union[str, None] = "0017_notifications" branch_labels: Union[str, Sequence[str], None] = None depends_on: Union[str, Sequence[str], None] = None def upgrade() -> None: op.add_column( "app_state", sa.Column("maintenance_revalidate_batch", sa.Integer(), nullable=True), ) def downgrade() -> None: op.drop_column("app_state", "maintenance_revalidate_batch")