forked from NYANDEV/forgejo
Rename db Engines related functions (#17481)
* Rename db Engines related functions Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
parent
76a3190b8a
commit
63c0dc89ef
14 changed files with 31 additions and 31 deletions
|
@ -256,13 +256,13 @@ func doMigrationTest(t *testing.T, version string) {
|
|||
|
||||
setting.NewXORMLogService(false)
|
||||
|
||||
err := db.NewEngine(context.Background(), wrappedMigrate)
|
||||
err := db.InitEngineWithMigration(context.Background(), wrappedMigrate)
|
||||
assert.NoError(t, err)
|
||||
currentEngine.Close()
|
||||
|
||||
beans, _ := db.NamesToBean()
|
||||
|
||||
err = db.NewEngine(context.Background(), func(x *xorm.Engine) error {
|
||||
err = db.InitEngineWithMigration(context.Background(), func(x *xorm.Engine) error {
|
||||
currentEngine = x
|
||||
return migrations.RecreateTables(beans...)(x)
|
||||
})
|
||||
|
@ -270,7 +270,7 @@ func doMigrationTest(t *testing.T, version string) {
|
|||
currentEngine.Close()
|
||||
|
||||
// We do this a second time to ensure that there is not a problem with retained indices
|
||||
err = db.NewEngine(context.Background(), func(x *xorm.Engine) error {
|
||||
err = db.InitEngineWithMigration(context.Background(), func(x *xorm.Engine) error {
|
||||
currentEngine = x
|
||||
return migrations.RecreateTables(beans...)(x)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue