1
0
Fork 0
forked from forgejo/forgejo

Fix wrong warn messages in migration steps (#25475) (#25487)

This commit is contained in:
Giteabot 2023-06-24 05:51:26 -04:00 committed by GitHub
parent 050c38ca19
commit 2cd9d6b3f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

View file

@ -123,7 +123,10 @@ func newXORMEngine() (*xorm.Engine, error) {
// SyncAllTables sync the schemas of all tables, is required by unit test code
func SyncAllTables() error {
return x.StoreEngine("InnoDB").Sync2(tables...)
_, err := x.StoreEngine("InnoDB").SyncWithOptions(xorm.SyncOptions{
WarnIfDatabaseColumnMissed: true,
}, tables...)
return err
}
// InitEngine initializes the xorm.Engine and sets it as db.DefaultContext