mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 10:18:38 +00:00
Split migrations folder (#21549)
There are too many files in `models/migrations` folder so that I split them into sub folders.
This commit is contained in:
@@ -20,6 +20,7 @@ import (
|
||||
|
||||
"code.gitea.io/gitea/models/db"
|
||||
"code.gitea.io/gitea/models/migrations"
|
||||
migrate_base "code.gitea.io/gitea/models/migrations/base"
|
||||
"code.gitea.io/gitea/models/unittest"
|
||||
"code.gitea.io/gitea/modules/base"
|
||||
"code.gitea.io/gitea/modules/charset"
|
||||
@@ -302,7 +303,7 @@ func doMigrationTest(t *testing.T, version string) {
|
||||
|
||||
err = db.InitEngineWithMigration(context.Background(), func(x *xorm.Engine) error {
|
||||
currentEngine = x
|
||||
return migrations.RecreateTables(beans...)(x)
|
||||
return migrate_base.RecreateTables(beans...)(x)
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
currentEngine.Close()
|
||||
@@ -310,7 +311,7 @@ func doMigrationTest(t *testing.T, version string) {
|
||||
// We do this a second time to ensure that there is not a problem with retained indices
|
||||
err = db.InitEngineWithMigration(context.Background(), func(x *xorm.Engine) error {
|
||||
currentEngine = x
|
||||
return migrations.RecreateTables(beans...)(x)
|
||||
return migrate_base.RecreateTables(beans...)(x)
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
|
||||
|
Reference in New Issue
Block a user