mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-29 10:16:09 +08:00
fix: Delete the redundant migrations (#8968)
This commit is contained in:
parent
3af68cdb54
commit
fa8f7f83af
2 changed files with 2 additions and 12 deletions
|
|
@ -16,7 +16,6 @@ func Init() {
|
||||||
migrations.InitTerminalSetting,
|
migrations.InitTerminalSetting,
|
||||||
migrations.InitGoogle,
|
migrations.InitGoogle,
|
||||||
migrations.AddTaskDB,
|
migrations.AddTaskDB,
|
||||||
migrations.UpdateDeveloperMode,
|
|
||||||
migrations.AddXpackHideMenu,
|
migrations.AddXpackHideMenu,
|
||||||
})
|
})
|
||||||
if err := m.Migrate(); err != nil {
|
if err := m.Migrate(); err != nil {
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,12 @@ package migrations
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/1Panel-dev/1Panel/core/app/dto"
|
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/1Panel-dev/1Panel/core/app/dto"
|
||||||
|
|
||||||
"github.com/1Panel-dev/1Panel/core/app/model"
|
"github.com/1Panel-dev/1Panel/core/app/model"
|
||||||
"github.com/1Panel-dev/1Panel/core/constant"
|
"github.com/1Panel-dev/1Panel/core/constant"
|
||||||
"github.com/1Panel-dev/1Panel/core/global"
|
"github.com/1Panel-dev/1Panel/core/global"
|
||||||
|
|
@ -274,16 +275,6 @@ var AddTaskDB = &gormigrate.Migration{
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
var UpdateDeveloperMode = &gormigrate.Migration{
|
|
||||||
ID: "20240516-update-developer-mode",
|
|
||||||
Migrate: func(tx *gorm.DB) error {
|
|
||||||
if err := tx.Model(&model.Setting{}).Where("key = ?", "DeveloperMode").Update("value", constant.StatusEnable).Error; err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
var AddXpackHideMenu = &gormigrate.Migration{
|
var AddXpackHideMenu = &gormigrate.Migration{
|
||||||
ID: "20250529-add-xpack-hide-menu",
|
ID: "20250529-add-xpack-hide-menu",
|
||||||
Migrate: func(tx *gorm.DB) error {
|
Migrate: func(tx *gorm.DB) error {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue