"""external_link.recoveries: how many times recovery has retried a dead link. The daily recovery gives a dead link one more attempt, spaced further apart each time, and leaves it dead once the count reaches its limit. A link that can never succeed is then downloaded a handful of times in total, not every day. Revision ID: 0118 Revises: 0117 Create Date: 2026-11-05 """ import sqlalchemy as sa from alembic import op revision = "0118" down_revision = "0117" branch_labels = None depends_on = None def upgrade() -> None: op.add_column( "external_link", sa.Column( "recoveries", sa.Integer(), nullable=False, server_default=sa.text("0") ), ) def downgrade() -> None: op.drop_column("external_link", "recoveries")