mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-12-12 15:39:09 +08:00
18 lines
389 B
Go
18 lines
389 B
Go
|
package migrations
|
||
|
|
||
|
import (
|
||
|
"github.com/1Panel-dev/1Panel/backend/app/model"
|
||
|
"github.com/go-gormigrate/gormigrate/v2"
|
||
|
"gorm.io/gorm"
|
||
|
)
|
||
|
|
||
|
var AddDefaultNetwork = &gormigrate.Migration{
|
||
|
ID: "20230918-add-default-network",
|
||
|
Migrate: func(tx *gorm.DB) error {
|
||
|
if err := tx.Create(&model.Setting{Key: "DefaultNetwork", Value: ""}).Error; err != nil {
|
||
|
return err
|
||
|
}
|
||
|
return nil
|
||
|
},
|
||
|
}
|