feat: 系统升级支持数据库自动迁移,避免手动执行升级脚本

This commit is contained in:
meilin.huang
2025-02-13 21:11:23 +08:00
parent efb2b7368c
commit aa393590b2
78 changed files with 1965 additions and 1827 deletions

View File

@@ -4,12 +4,13 @@ import (
"mayfly-go/pkg/model"
)
// DbSql 用户保存的数据库sql
type DbSql struct {
model.Model `orm:"-"`
DbId uint64 `json:"dbId"`
Db string `json:"db"`
Type int `json:"type"` // 类型
Sql string `json:"sql"`
Name string `json:"name"`
DbId uint64 `json:"dbId" gorm:"not null;"`
Db string `json:"db" gorm:"size:100;not null;"`
Type int `json:"type" gorm:"not null;"` // 类型
Sql string `json:"sql" gorm:"size:4000;comment:sql语句"`
Name string `json:"name" gorm:"size:255;not null;comment:sql模板名"`
}