2023-11-14 18:44:09 +08:00
|
|
|
package migrations
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/1Panel-dev/1Panel/backend/app/model"
|
|
|
|
"github.com/go-gormigrate/gormigrate/v2"
|
|
|
|
"gorm.io/gorm"
|
|
|
|
)
|
|
|
|
|
|
|
|
var UpdateAcmeAccount = &gormigrate.Migration{
|
2023-11-16 14:38:07 +08:00
|
|
|
ID: "20231117-update-acme-account",
|
2023-11-14 18:44:09 +08:00
|
|
|
Migrate: func(tx *gorm.DB) error {
|
|
|
|
if err := tx.AutoMigrate(&model.WebsiteAcmeAccount{}); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
},
|
|
|
|
}
|
2023-11-20 10:44:10 +08:00
|
|
|
|
|
|
|
var UpdateWebsiteSSL = &gormigrate.Migration{
|
|
|
|
ID: "20231119-update-website-ssl",
|
|
|
|
Migrate: func(tx *gorm.DB) error {
|
|
|
|
if err := tx.AutoMigrate(&model.WebsiteSSL{}); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
},
|
|
|
|
}
|
2023-11-27 12:04:09 +08:00
|
|
|
|
|
|
|
var AddWebsiteCA = &gormigrate.Migration{
|
|
|
|
ID: "20231125-add-website-ca",
|
|
|
|
Migrate: func(tx *gorm.DB) error {
|
|
|
|
if err := tx.AutoMigrate(&model.WebsiteCA{}); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
},
|
|
|
|
}
|