From 6d2a307ad8af7d686f1c3a3706ff0f2df895658a Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sat, 27 Apr 2024 22:02:07 +0800 Subject: [PATCH] Rename migration package name for 1.22-rc1 (#30730) Ref: Propose to restart 1.22 release #30501 --- models/migrations/migrations.go | 15 ++++++++------- models/migrations/{v1_23 => v1_22}/v294.go | 2 +- models/migrations/{v1_23 => v1_22}/v294_test.go | 2 +- models/migrations/{v1_23 => v1_22}/v295.go | 2 +- models/migrations/{v1_23 => v1_22}/v296.go | 2 +- models/migrations/{v1_23 => v1_22}/v297.go | 2 +- models/migrations/{v1_23 => v1_22}/v298.go | 2 +- 7 files changed, 14 insertions(+), 13 deletions(-) rename models/migrations/{v1_23 => v1_22}/v294.go (98%) rename models/migrations/{v1_23 => v1_22}/v294_test.go (98%) rename models/migrations/{v1_23 => v1_22}/v295.go (96%) rename models/migrations/{v1_23 => v1_22}/v296.go (95%) rename models/migrations/{v1_23 => v1_22}/v297.go (94%) rename models/migrations/{v1_23 => v1_22}/v298.go (90%) diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go index 220d8c2331..4501585250 100644 --- a/models/migrations/migrations.go +++ b/models/migrations/migrations.go @@ -21,7 +21,6 @@ import ( "code.gitea.io/gitea/models/migrations/v1_20" "code.gitea.io/gitea/models/migrations/v1_21" "code.gitea.io/gitea/models/migrations/v1_22" - "code.gitea.io/gitea/models/migrations/v1_23" "code.gitea.io/gitea/models/migrations/v1_6" "code.gitea.io/gitea/models/migrations/v1_7" "code.gitea.io/gitea/models/migrations/v1_8" @@ -574,18 +573,20 @@ var migrations = []Migration{ // v293 -> v294 NewMigration("Ensure every project has exactly one default column", v1_22.CheckProjectColumnsConsistency), - // Gitea 1.22.0 ends at 294 + // Gitea 1.22.0-rc0 ends at 294 // v294 -> v295 - NewMigration("Add unique index for project issue table", v1_23.AddUniqueIndexForProjectIssue), + NewMigration("Add unique index for project issue table", v1_22.AddUniqueIndexForProjectIssue), // v295 -> v296 - NewMigration("Add commit status summary table", v1_23.AddCommitStatusSummary), + NewMigration("Add commit status summary table", v1_22.AddCommitStatusSummary), // v296 -> v297 - NewMigration("Add missing field of commit status summary table", v1_23.AddCommitStatusSummary2), + NewMigration("Add missing field of commit status summary table", v1_22.AddCommitStatusSummary2), // v297 -> v298 - NewMigration("Add everyone_access_mode for repo_unit", v1_23.AddRepoUnitEveryoneAccessMode), + NewMigration("Add everyone_access_mode for repo_unit", v1_22.AddRepoUnitEveryoneAccessMode), // v298 -> v299 - NewMigration("Drop wrongly created table o_auth2_application", v1_23.DropWronglyCreatedTable), + NewMigration("Drop wrongly created table o_auth2_application", v1_22.DropWronglyCreatedTable), + + // Gitea 1.22.0-rc1 ends at 299 } // GetCurrentDBVersion returns the current db version diff --git a/models/migrations/v1_23/v294.go b/models/migrations/v1_22/v294.go similarity index 98% rename from models/migrations/v1_23/v294.go rename to models/migrations/v1_22/v294.go index f2a54f6d23..20e261fb1b 100644 --- a/models/migrations/v1_23/v294.go +++ b/models/migrations/v1_22/v294.go @@ -1,7 +1,7 @@ // Copyright 2024 The Gitea Authors. All rights reserved. // SPDX-License-Identifier: MIT -package v1_23 //nolint +package v1_22 //nolint import ( "fmt" diff --git a/models/migrations/v1_23/v294_test.go b/models/migrations/v1_22/v294_test.go similarity index 98% rename from models/migrations/v1_23/v294_test.go rename to models/migrations/v1_22/v294_test.go index d9a44ad866..82a3bcd602 100644 --- a/models/migrations/v1_23/v294_test.go +++ b/models/migrations/v1_22/v294_test.go @@ -1,7 +1,7 @@ // Copyright 2024 The Gitea Authors. All rights reserved. // SPDX-License-Identifier: MIT -package v1_23 //nolint +package v1_22 //nolint import ( "slices" diff --git a/models/migrations/v1_23/v295.go b/models/migrations/v1_22/v295.go similarity index 96% rename from models/migrations/v1_23/v295.go rename to models/migrations/v1_22/v295.go index 9a2003cfc1..17bdadb4ad 100644 --- a/models/migrations/v1_23/v295.go +++ b/models/migrations/v1_22/v295.go @@ -1,7 +1,7 @@ // Copyright 2024 The Gitea Authors. All rights reserved. // SPDX-License-Identifier: MIT -package v1_23 //nolint +package v1_22 //nolint import "xorm.io/xorm" diff --git a/models/migrations/v1_23/v296.go b/models/migrations/v1_22/v296.go similarity index 95% rename from models/migrations/v1_23/v296.go rename to models/migrations/v1_22/v296.go index 495ae2ab23..1ecacab95f 100644 --- a/models/migrations/v1_23/v296.go +++ b/models/migrations/v1_22/v296.go @@ -1,7 +1,7 @@ // Copyright 2024 The Gitea Authors. All rights reserved. // SPDX-License-Identifier: MIT -package v1_23 //nolint +package v1_22 //nolint import "xorm.io/xorm" diff --git a/models/migrations/v1_23/v297.go b/models/migrations/v1_22/v297.go similarity index 94% rename from models/migrations/v1_23/v297.go rename to models/migrations/v1_22/v297.go index e79f04cf9c..7d4b506925 100644 --- a/models/migrations/v1_23/v297.go +++ b/models/migrations/v1_22/v297.go @@ -1,7 +1,7 @@ // Copyright 2024 The Gitea Authors. All rights reserved. // SPDX-License-Identifier: MIT -package v1_23 //nolint +package v1_22 //nolint import ( "code.gitea.io/gitea/models/perm" diff --git a/models/migrations/v1_23/v298.go b/models/migrations/v1_22/v298.go similarity index 90% rename from models/migrations/v1_23/v298.go rename to models/migrations/v1_22/v298.go index 8761a05d3d..b9f3b95ade 100644 --- a/models/migrations/v1_23/v298.go +++ b/models/migrations/v1_22/v298.go @@ -1,7 +1,7 @@ // Copyright 2024 The Gitea Authors. All rights reserved. // SPDX-License-Identifier: MIT -package v1_23 //nolint +package v1_22 //nolint import "xorm.io/xorm"