[优化] 修复数据库迁移问题

This commit is contained in:
ryan
2026-06-01 17:15:17 +08:00
parent df63b0113a
commit 663da01bda
5 changed files with 46 additions and 8 deletions
+6 -1
View File
@@ -64,7 +64,12 @@ func migrateV19(ctx Context, db *gorm.DB, backend string) error {
slog.Info("dropped tunnel_id column from proxy_routes")
}
return ctx.ApplyCurrentSchema(db, backend)
slog.Info("v19: starting ApplyCurrentSchema (auto-migrate all tables)")
if err := ctx.ApplyCurrentSchema(db, backend); err != nil {
return err
}
slog.Info("v19: ApplyCurrentSchema completed")
return nil
}
func validateV19(ctx Context, db *gorm.DB, backend string) error {