From 07e984828a336b41780af23af6cbe9ad5a773023 Mon Sep 17 00:00:00 2001 From: Odboy Date: Sun, 17 May 2026 21:15:58 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=A7=BB=E9=99=A4=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E6=97=B6=E6=97=A7=E6=95=B0=E6=8D=AE=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/internal/dao/engine.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/server/internal/dao/engine.go b/server/internal/dao/engine.go index 800f4b5..9337701 100644 --- a/server/internal/dao/engine.go +++ b/server/internal/dao/engine.go @@ -39,20 +39,10 @@ func Init() error { return err } - // 迁移旧数据 & 清理格式 - migrateOldData() - // insert initial data if tables are empty return initSeedData() } -func migrateOldData() { - // 清理 owner_ids 中可能存在的空格 - Engine.Exec("UPDATE application SET owner_ids = REPLACE(owner_ids, ' ', '') WHERE owner_ids LIKE '% %'") - // 清理 master_uids 中可能存在的空格 - Engine.Exec("UPDATE business_group SET master_uids = REPLACE(master_uids, ' ', '') WHERE master_uids LIKE '% %'") -} - func initSeedData() error { // check if profiles table is empty count, err := Engine.Count(new(model.Profile))