mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 09:13:49 +08:00
fix: 重写迁移
This commit is contained in:
@@ -72,7 +72,22 @@ func init() {
|
||||
Migrations = append(Migrations, &gormigrate.Migration{
|
||||
ID: "20250318-cert-script",
|
||||
Migrate: func(tx *gorm.DB) error {
|
||||
return tx.AutoMigrate(&biz.Cert{})
|
||||
return tx.AutoMigrate(
|
||||
&biz.Cache{},
|
||||
&biz.Cert{},
|
||||
&biz.CertDNS{},
|
||||
&biz.CertAccount{},
|
||||
&biz.Cron{},
|
||||
&biz.Monitor{},
|
||||
&biz.App{},
|
||||
&biz.Setting{},
|
||||
&biz.Task{},
|
||||
&biz.User{},
|
||||
&biz.Website{},
|
||||
&biz.SSH{},
|
||||
&biz.DatabaseServer{},
|
||||
&biz.DatabaseUser{},
|
||||
)
|
||||
},
|
||||
Rollback: func(tx *gorm.DB) error {
|
||||
return tx.Migrator().DropColumn(&biz.Cert{}, "script")
|
||||
|
||||
Reference in New Issue
Block a user