diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go index e134a875e..00d84da2e 100644 --- a/models/migrations/migrations.go +++ b/models/migrations/migrations.go @@ -212,8 +212,6 @@ var migrations = []Migration{ NewMigration("Add ResolveDoerID to Comment table", addResolveDoerIDCommentColumn), // v139 -> v140 NewMigration("prepend refs/heads/ to issue refs", prependRefsHeadsToIssueRefs), - // v140 -> v141 - NewMigration("init selected tag", initSelectedTag), } // GetCurrentDBVersion returns the current db version diff --git a/models/migrations/v140.go b/models/migrations/v140.go deleted file mode 100644 index 5684dba44..000000000 --- a/models/migrations/v140.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2019 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package migrations - -import ( - "code.gitea.io/gitea/models" - "xorm.io/xorm" -) - -func initSelectedTag(x *xorm.Engine) error { - p := &models.OfficialTag{ - Code: "Selected", - } - - ok, err := x.Get(p) - - if ok { - return nil - } - - t := &models.OfficialTag{ - ID: 1, - Code: "Selected", - Name: "精选项目", - Limit: 9, - } - _, err = x.Insert(t) - return err -}