From 5f6593eaf2cffef784d3b4725aff55c618b77f18 Mon Sep 17 00:00:00 2001 From: marco Date: Fri, 24 Jul 2026 20:32:38 +0800 Subject: [PATCH] =?UTF-8?q?fix(alembic):=20=E7=BC=A9=E7=9F=AD=20withdraw?= =?UTF-8?q?=20=E8=BF=81=E7=A7=BB=20revision=20id=20=E8=87=B3=20varchar(32)?= =?UTF-8?q?=20=E5=86=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit drop_withdraw_active_unique_index (33 字符) 超过 alembic_version.version_num 的 varchar(32) 上限,生产 alembic 写版本号时 StringDataRightTruncation 报错、 部署中断。改短为 drop_withdraw_active_uniq_idx (29 字符):迁移逻辑(drop_index) 一字不变、无下游引用、仍为唯一 head。 Co-Authored-By: Claude Fable 5 --- ...ctive_unique_index.py => drop_withdraw_active_uniq_idx.py} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename alembic/versions/{drop_withdraw_active_unique_index.py => drop_withdraw_active_uniq_idx.py} (92%) diff --git a/alembic/versions/drop_withdraw_active_unique_index.py b/alembic/versions/drop_withdraw_active_uniq_idx.py similarity index 92% rename from alembic/versions/drop_withdraw_active_unique_index.py rename to alembic/versions/drop_withdraw_active_uniq_idx.py index 97ac454..13ef3b7 100644 --- a/alembic/versions/drop_withdraw_active_unique_index.py +++ b/alembic/versions/drop_withdraw_active_uniq_idx.py @@ -1,6 +1,6 @@ """drop withdraw active-order partial unique index (allow multiple in-flight withdrawals) -Revision ID: drop_withdraw_active_unique_index +Revision ID: drop_withdraw_active_uniq_idx Revises: d8dd2106e438 Create Date: 2026-07-24 00:00:00.000000 @@ -12,7 +12,7 @@ import sqlalchemy as sa # revision identifiers, used by Alembic. -revision: str = "drop_withdraw_active_unique_index" +revision: str = "drop_withdraw_active_uniq_idx" down_revision: Union[str, Sequence[str], None] = "d8dd2106e438" branch_labels: Union[str, Sequence[str], None] = None depends_on: Union[str, Sequence[str], None] = None