mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 14:08:06 +08:00
fix: 解决数据库列表样式错乱的问题 (#2296)
This commit is contained in:
parent
21755223e1
commit
43b3ef47f3
@ -42,6 +42,7 @@ func Init() {
|
|||||||
migrations.AddDatabases,
|
migrations.AddDatabases,
|
||||||
migrations.UpdateDatabase,
|
migrations.UpdateDatabase,
|
||||||
migrations.UpdateAppInstallResource,
|
migrations.UpdateAppInstallResource,
|
||||||
|
migrations.DropDatabaseLocal,
|
||||||
})
|
})
|
||||||
if err := m.Migrate(); err != nil {
|
if err := m.Migrate(); err != nil {
|
||||||
global.LOG.Error(err)
|
global.LOG.Error(err)
|
||||||
|
@ -759,3 +759,11 @@ var UpdateAppInstallResource = &gormigrate.Migration{
|
|||||||
return nil
|
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…
x
Reference in New Issue
Block a user