mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 05:52:43 +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:
parent
4827f42f56
commit
e72acd5e5b
190 changed files with 1711 additions and 1481 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue