|
|
@ -9,7 +9,7 @@ import ( |
|
|
|
var AddDefaultNetwork = &gormigrate.Migration{ |
|
|
|
var AddDefaultNetwork = &gormigrate.Migration{ |
|
|
|
ID: "20230928-add-default-network", |
|
|
|
ID: "20230928-add-default-network", |
|
|
|
Migrate: func(tx *gorm.DB) error { |
|
|
|
Migrate: func(tx *gorm.DB) error { |
|
|
|
if err := tx.Create(&model.Setting{Key: "DefaultNetwork", Value: ""}).Error; err != nil { |
|
|
|
if err := tx.Create(&model.Setting{Key: "DefaultNetwork", Value: "all"}).Error; err != nil { |
|
|
|
return err |
|
|
|
return err |
|
|
|
} |
|
|
|
} |
|
|
|
if err := tx.Create(&model.Setting{Key: "LastCleanTime", Value: ""}).Error; err != nil { |
|
|
|
if err := tx.Create(&model.Setting{Key: "LastCleanTime", Value: ""}).Error; err != nil { |
|
|
|