mirror of
https://github.com/acepanel/panel.git
synced 2026-02-07 09:27:15 +08:00
feat: 优化自动迁移
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
|
||||
"github.com/goravel/framework/contracts/database/seeder"
|
||||
"github.com/goravel/framework/contracts/foundation"
|
||||
"github.com/goravel/framework/database/gorm"
|
||||
"github.com/goravel/framework/facades"
|
||||
|
||||
"github.com/TheTNB/panel/app/models"
|
||||
@@ -19,7 +20,7 @@ func (receiver *DatabaseServiceProvider) Register(app foundation.Application) {
|
||||
|
||||
func (receiver *DatabaseServiceProvider) Boot(app foundation.Application) {
|
||||
facades.Seeder().Register([]seeder.Seeder{})
|
||||
if err := facades.Orm().Query().AutoMigrate(
|
||||
if err := facades.Orm().Query().(*gorm.QueryImpl).Instance().AutoMigrate(
|
||||
&models.Cert{},
|
||||
&models.CertDNS{},
|
||||
&models.CertUser{},
|
||||
|
||||
Reference in New Issue
Block a user