"""download_revisit_days — how far back a tick keeps looking for EDITED posts. Operator, 2026-09-23, pointing at a Floppystack post: *"this post has been updated as he implements hot fixes — any chance we have a way to scan for or see updated posts so we can update ours to match and pull the new attachments and pictures etc."* A tick stopped after 20 contiguous already-have-it items. That is the right instinct and the wrong unit: a post edited three days after publication sits well below twenty seen items, so the walk turned around before reaching it. The walk now needs BOTH a run of seen items and a post older than this many days before it stops. A settings row rather than a constant (rule 25) because the right window is a property of the CREATOR, not of FabledCurator — one artist appends hotfix builds for a fortnight, another never touches a post again. 0 turns the revisit off entirely and restores the pure count early-out. 30 days is the operator's own number, 2026-09-23. Revision ID: 0108 Revises: 0107 Create Date: 2026-09-23 """ from typing import Sequence, Union import sqlalchemy as sa from alembic import op revision: str = "0108" down_revision: Union[str, None] = "0107" branch_labels: Union[str, Sequence[str], None] = None depends_on: Union[str, Sequence[str], None] = None def upgrade() -> None: # server_default so the existing single settings row gets the window without # a data migration — and so an install that predates this column reads 30 # rather than 0. 0 is a real, meaningful value here (revisit off), so the # column must never be allowed to arrive at it by omission. op.add_column( "import_settings", sa.Column( "download_revisit_days", sa.Integer(), nullable=False, server_default="30", ), ) def downgrade() -> None: op.drop_column("import_settings", "download_revisit_days")