Browse Source

#981

delete sql
pull/1190/head
chenyifan01 3 years ago
parent
commit
35fbd89eba
2 changed files with 0 additions and 33 deletions
  1. +0
    -2
      models/migrations/migrations.go
  2. +0
    -31
      models/migrations/v140.go

+ 0
- 2
models/migrations/migrations.go View File

@@ -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


+ 0
- 31
models/migrations/v140.go View File

@@ -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
}

Loading…
Cancel
Save