mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-24 19:19:15 +08:00
fix: 解决数据库列表样式错乱的问题 (#2296)
This commit is contained in:
parent
21755223e1
commit
43b3ef47f3
@ -42,6 +42,7 @@ func Init() {
|
||||
migrations.AddDatabases,
|
||||
migrations.UpdateDatabase,
|
||||
migrations.UpdateAppInstallResource,
|
||||
migrations.DropDatabaseLocal,
|
||||
})
|
||||
if err := m.Migrate(); err != nil {
|
||||
global.LOG.Error(err)
|
||||
|
@ -759,3 +759,11 @@ var UpdateAppInstallResource = &gormigrate.Migration{
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
||||
var DropDatabaseLocal = &gormigrate.Migration{
|
||||
ID: "20230914-drop-database-local",
|
||||
Migrate: func(tx *gorm.DB) error {
|
||||
_ = tx.Where("name = ? AND address = ?", "local", "127.0.0.1").Delete(&model.Database{}).Error
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user