mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-03 16:00:25 +08:00
feat: 优化数据库迁移与添加老表迁移
This commit is contained in:
@@ -10,9 +10,9 @@ type AuthCert struct {
|
||||
model.Model
|
||||
|
||||
Name string `json:"name"`
|
||||
AuthMethod int8 `json:"authMethod"` // 1.密码 2.秘钥
|
||||
Password string `json:"password"` // 密码or私钥
|
||||
Passphrase string `json:"passphrase"` // 私钥口令
|
||||
AuthMethod int8 `json:"authMethod"` // 1.密码 2.秘钥
|
||||
Password string `json:"password" gorm:"column:password;type:varchar(4200)"` // 密码or私钥
|
||||
Passphrase string `json:"passphrase"` // 私钥口令
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ type MachineScript struct {
|
||||
Name string `json:"name"`
|
||||
MachineId uint64 `json:"machineId"` // 机器id
|
||||
Type int `json:"type"`
|
||||
Description string `json:"description"` // 脚本描述
|
||||
Params string `json:"params"` // 参数列表json
|
||||
Script string `json:"script"` // 脚本内容
|
||||
Description string `json:"description"` // 脚本描述
|
||||
Params string `json:"params"` // 参数列表json
|
||||
Script string `json:"script" gorm:"column:script;type:text"` // 脚本内容
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@ type Config struct {
|
||||
model.Model
|
||||
Name string `json:"name"` // 配置名
|
||||
Key string `json:"key"` // 配置key
|
||||
Params string `json:"params"`
|
||||
Value string `json:"value"`
|
||||
Params string `json:"params" gorm:"column:params;type:varchar(1000)"`
|
||||
Value string `json:"value" gorm:"column:value;type:varchar(1000)"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@ type SysLog struct {
|
||||
|
||||
Type int8 `json:"type"`
|
||||
Description string `json:"description"`
|
||||
ReqParam string `json:"reqParam"` // 请求参数
|
||||
Resp string `json:"resp"` // 响应结构
|
||||
ReqParam string `json:"reqParam" gorm:"column:req_param;type:varchar(1000)"` // 请求参数
|
||||
Resp string `json:"resp" gorm:"column:resp;type:varchar(1000)"` // 响应结构
|
||||
}
|
||||
|
||||
func (a *SysLog) TableName() string {
|
||||
|
||||
Reference in New Issue
Block a user