From e72acd5e5b2d043fcf0a0182a1eedaed8120c155 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 2 Nov 2022 16:54:36 +0800 Subject: Split migrations folder (#21549) There are too many files in `models/migrations` folder so that I split them into sub folders. --- tests/integration/migration-test/migration_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/integration') 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) -- cgit v1.2.3