Files
siftlode/backend/alembic/versions/0018_maintenance_batch_setting.py
T
peter b1832afd18 style: apply ruff format across backend + scripts (line-length 100)
Mechanical, whole-tree `ruff format` pass — no behaviour change. Recorded in
.git-blame-ignore-revs (next commit) so git blame skips it.
2026-08-23 07:43:06 +02:00

32 lines
917 B
Python

"""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")