fix: replace bad migration revision ID with proper alembic-generated ID

The torrent_distribution_support migration was manually created with a
duplicate revision ID (a1b2c3d4e5f6) already in use by an older migration,
and pointed to the wrong down_revision (fd9f7e2f2b78 root instead of
9884324a48e3 current head). This caused a cycle in the revision map and
alembic upgrade head failed silently, leaving prod with new code but old
schema → 502 on all shop endpoints.

Deleted the broken file, regenerated with alembic revision to get a proper
unique ID (c0236e351476), set correct down_revision, preserved idempotent
_column_exists guards.
This commit is contained in:
russell@unturf.com 2026-04-06 13:40:36 -04:00
parent d7e8ec5bc2
commit c12365143d

View file

@ -1,22 +1,20 @@
"""torrent magnet links
"""torrent_distribution_support
Revision ID: a1b2c3d4e5f6
Revises: fd9f7e2f2b78
Create Date: 2026-04-05 00:00:00.000000
Revision ID: c0236e351476
Revises: 9884324a48e3
Create Date: 2026-04-06 13:40:00.002888
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "a1b2c3d4e5f6"
down_revision = "fd9f7e2f2b78"
revision = 'c0236e351476'
down_revision = '9884324a48e3'
branch_labels = None
depends_on = None
def _column_exists(table, column):
conn = op.get_bind()
result = conn.execute(sa.text(f"PRAGMA table_info({table})"))