Skip to content

Commit fa8f7f8

Browse files
authored
fix: Delete the redundant migrations (#8968)
1 parent 3af68cd commit fa8f7f8

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

core/init/migration/migrate.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ func Init() {
1616
migrations.InitTerminalSetting,
1717
migrations.InitGoogle,
1818
migrations.AddTaskDB,
19-
migrations.UpdateDeveloperMode,
2019
migrations.AddXpackHideMenu,
2120
})
2221
if err := m.Migrate(); err != nil {

core/init/migration/migrations/init.go

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ package migrations
33
import (
44
"encoding/json"
55
"fmt"
6-
"github.com/1Panel-dev/1Panel/core/app/dto"
76
"path"
87
"strings"
98
"time"
109

10+
"github.com/1Panel-dev/1Panel/core/app/dto"
11+
1112
"github.com/1Panel-dev/1Panel/core/app/model"
1213
"github.com/1Panel-dev/1Panel/core/constant"
1314
"github.com/1Panel-dev/1Panel/core/global"
@@ -274,16 +275,6 @@ var AddTaskDB = &gormigrate.Migration{
274275
},
275276
}
276277

277-
var UpdateDeveloperMode = &gormigrate.Migration{
278-
ID: "20240516-update-developer-mode",
279-
Migrate: func(tx *gorm.DB) error {
280-
if err := tx.Model(&model.Setting{}).Where("key = ?", "DeveloperMode").Update("value", constant.StatusEnable).Error; err != nil {
281-
return err
282-
}
283-
return nil
284-
},
285-
}
286-
287278
var AddXpackHideMenu = &gormigrate.Migration{
288279
ID: "20250529-add-xpack-hide-menu",
289280
Migrate: func(tx *gorm.DB) error {

0 commit comments

Comments
 (0)