diff options
Diffstat (limited to 'models/db/engine.go')
-rwxr-xr-x | models/db/engine.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/models/db/engine.go b/models/db/engine.go index 56dd209fd7..3eb16f8042 100755 --- a/models/db/engine.go +++ b/models/db/engine.go @@ -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 |