fix: remove duplicate auth_apiname migration from script (already done manually)

This commit is contained in:
yumoqing 2026-05-20 16:15:25 +08:00
parent f0950f3673
commit 29a397bbf4

View File

@ -25,16 +25,8 @@ async def generate_migration_sql():
"-- Migration: uapi table apisetid -> upappid", "-- Migration: uapi table apisetid -> upappid",
"-- Removes uapiset intermediate layer.", "-- Removes uapiset intermediate layer.",
"", "",
"-- Step 1: Schema changes", "-- Step 1: Add upappid column to uapi",
"-- 1.1 Add upappid to uapi",
"ALTER TABLE uapi ADD COLUMN upappid VARCHAR(21) DEFAULT NULL COMMENT '上位系统ID' AFTER id;", "ALTER TABLE uapi ADD COLUMN upappid VARCHAR(21) DEFAULT NULL COMMENT '上位系统ID' AFTER id;",
"",
"-- 1.2 Add auth_apiname to upapp",
"ALTER TABLE upapp ADD COLUMN auth_apiname VARCHAR(200) DEFAULT NULL COMMENT '授权API名' AFTER apisetid;",
"",
"-- 1.3 Migrate auth_apiname from uapiset to upapp",
"UPDATE upapp u JOIN uapiset s ON u.apisetid = s.id",
"SET u.auth_apiname = s.auth_apiname WHERE s.auth_apiname IS NOT NULL;",
"" ""
] ]