fix 🐛 优化迁移功能
This commit is contained in:
1 parent
845558cc65
commit
bf7934c20a
21 files changed
+256
-466
No files matched your search
@@ -20,11 +20,10 @@ func _1613720892819Test(db *gorm.DB, version string) error {
|
||||
|
||||
// TODO: 这里开始写入要变更的内容
|
||||
t := &models.DictType{
|
||||
DictName: "内容状态",
|
||||
DictType: "sys_content_status",
|
||||
Status: "2",
|
||||
CreateBy: "1",
|
||||
UpdateBy: "1",
|
||||
DictName: "内容状态",
|
||||
DictType: "sys_content_status",
|
||||
Status: "2",
|
||||
ControlBy: models.ControlBy{CreateBy: 1, UpdateBy: 1},
|
||||
}
|
||||
err := tx.Create(t).Error
|
||||
if err != nil {
|
||||
@@ -38,8 +37,7 @@ func _1613720892819Test(db *gorm.DB, version string) error {
|
||||
DictValue: "1",
|
||||
DictType: "sys_content_status",
|
||||
Status: "1",
|
||||
CreateBy: "1",
|
||||
UpdateBy: "1",
|
||||
ControlBy: models.ControlBy{CreateBy: 1, UpdateBy: 1},
|
||||
}
|
||||
data[1] = models.DictData{
|
||||
DictSort: 1,
|
||||
@@ -47,8 +45,7 @@ func _1613720892819Test(db *gorm.DB, version string) error {
|
||||
DictValue: "2",
|
||||
DictType: "sys_content_status",
|
||||
Status: "1",
|
||||
CreateBy: "1",
|
||||
UpdateBy: "1",
|
||||
ControlBy: models.ControlBy{CreateBy: 1, UpdateBy: 1},
|
||||
}
|
||||
err = tx.Create(data).Error
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user