aboutsummaryrefslogtreecommitdiffstats
path: root/tests/integration
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-11-02 16:54:36 +0800
committerGitHub <noreply@github.com>2022-11-02 16:54:36 +0800
commite72acd5e5b2d043fcf0a0182a1eedaed8120c155 (patch)
tree77e4c341bef6450e5dfa7a1f61c9693527a133d0 /tests/integration
parent4827f42f56bcc70d40e073a8502930d9cce39798 (diff)
downloadgitea-e72acd5e5b2d043fcf0a0182a1eedaed8120c155.tar.gz
gitea-e72acd5e5b2d043fcf0a0182a1eedaed8120c155.zip
Split migrations folder (#21549)
There are too many files in `models/migrations` folder so that I split them into sub folders.
Diffstat (limited to 'tests/integration')
-rw-r--r--tests/integration/migration-test/migration_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/integration/migration-test/migration_test.go b/tests/integration/migration-test/migration_test.go
index b631168340..0159fb4f3c 100644
--- a/tests/integration/migration-test/migration_test.go
+++ b/tests/integration/migration-test/migration_test.go
@@ -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)