1
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
昔念
2026-04-18 16:34:03 +08:00
parent 823eef00ac
commit da118dc826
9 changed files with 165 additions and 126 deletions

View File

@@ -2,6 +2,7 @@ package admin
import (
"blazing/cool"
"blazing/modules/config/model"
"blazing/modules/config/service"
)
@@ -10,6 +11,15 @@ type SptController struct {
}
func init() {
// 仅为新加的 SPT 表做定点迁移,避免首次启用 EPS 时读取表结构报错。
db, err := cool.InitDB("default")
if err != nil {
panic(err)
}
if err = db.AutoMigrate(model.NewSptConfig()); err != nil {
panic(err)
}
cool.RegisterController(&SptController{
&cool.Controller{
Prefix: "/admin/config/spt",