fix: 修改 migration,解决升级失败的问题 (#2171)

pull/2176/head
ssongliu 2023-09-04 16:24:18 +08:00 committed by GitHub
parent 5b00bfd1c4
commit db443a9f82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -579,6 +579,9 @@ var AddTableFirewall = &gormigrate.Migration{
return err
}
_ = tx.Exec("alter table remote_dbs rename to databases;").Error
if err := tx.AutoMigrate(&model.Database{}); err != nil {
return err
}
return nil
},
}