mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 06:47:20 +08:00
feat: 去除迁移的强校验
This commit is contained in:
@@ -27,8 +27,7 @@ func initOrm() {
|
||||
|
||||
func runMigrate() {
|
||||
migrator := gormigrate.New(app.Orm, &gormigrate.Options{
|
||||
UseTransaction: true, // Note: MySQL not support DDL transaction
|
||||
ValidateUnknownMigrations: true,
|
||||
UseTransaction: true, // Note: MySQL not support DDL transaction
|
||||
}, migration.Migrations)
|
||||
if err := migrator.Migrate(); err != nil {
|
||||
log.Fatalf("failed to migrate database: %v", err)
|
||||
|
||||
@@ -53,15 +53,6 @@ func init() {
|
||||
)
|
||||
},
|
||||
})
|
||||
Migrations = append(Migrations, &gormigrate.Migration{
|
||||
ID: "20241107-database",
|
||||
Migrate: func(tx *gorm.DB) error {
|
||||
return nil
|
||||
},
|
||||
Rollback: func(tx *gorm.DB) error {
|
||||
return nil
|
||||
},
|
||||
})
|
||||
Migrations = append(Migrations, &gormigrate.Migration{
|
||||
ID: "20241124-database",
|
||||
Migrate: func(tx *gorm.DB) error {
|
||||
|
||||
Reference in New Issue
Block a user