From 10b37a6acce7af972072a96020c18e5ad851e025 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 15 Jun 2026 18:17:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(alembic):=20=E4=BF=AE=20007=20revision=20id?= =?UTF-8?q?=20=E8=B7=9F=E6=96=87=E4=BB=B6=E5=90=8D/008=20=E5=BC=95?= =?UTF-8?q?=E7=94=A8=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - revision '007_role_sys' → '007_role_system' - 008 的 down_revision 写的是 '007_role_system',但 007 实际是 '007_role_sys' - alembic upgrade head 报 KeyError: '007_role_system' - DB alembic_version 已记 007_role_system,改 007 对齐最干净 Co-Authored-By: Claude --- backend/alembic/versions/007_role_system.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/alembic/versions/007_role_system.py b/backend/alembic/versions/007_role_system.py index 0ca3158..de05184 100644 --- a/backend/alembic/versions/007_role_system.py +++ b/backend/alembic/versions/007_role_system.py @@ -5,7 +5,7 @@ 新增 role_mapping_rules 表(角色映射规则)。 预置三个基础角色:user、agent、admin。 -Revision ID: 007_role_sys +Revision ID: 007_role_system Revises: 006_admin_ext Create Date: 2026-06-12 23:00:00.000000 """ @@ -14,7 +14,7 @@ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. -revision = '007_role_sys' +revision = '007_role_system' down_revision = '006_admin_ext' branch_labels = None depends_on = None