mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-12-25 00:56:35 +08:00
feat: 系统升级支持数据库自动迁移,避免手动执行升级脚本
This commit is contained in:
@@ -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模板名"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user