From c12365143ded1d9cc0bf6ae753715018e92e5ae6 Mon Sep 17 00:00:00 2001 From: "russell@unturf.com" Date: Mon, 6 Apr 2026 13:40:36 -0400 Subject: [PATCH] fix: replace bad migration revision ID with proper alembic-generated ID MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- ...> c0236e351476_torrent_distribution_support.py} | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) rename make_post_sell/scripts/alembic/versions/{a1b2c3d4e5f6_torrent_magnet_links.py => c0236e351476_torrent_distribution_support.py} (88%) diff --git a/make_post_sell/scripts/alembic/versions/a1b2c3d4e5f6_torrent_magnet_links.py b/make_post_sell/scripts/alembic/versions/c0236e351476_torrent_distribution_support.py similarity index 88% rename from make_post_sell/scripts/alembic/versions/a1b2c3d4e5f6_torrent_magnet_links.py rename to make_post_sell/scripts/alembic/versions/c0236e351476_torrent_distribution_support.py index 41f4be5..d090544 100644 --- a/make_post_sell/scripts/alembic/versions/a1b2c3d4e5f6_torrent_magnet_links.py +++ b/make_post_sell/scripts/alembic/versions/c0236e351476_torrent_distribution_support.py @@ -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})"))