mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
Add label descriptions (#3662)
* Add label descriptions * Add default descriptions to label template
This commit is contained in:
parent
ad33730dca
commit
c0d41b1b77
14 changed files with 109 additions and 34 deletions
|
@ -168,6 +168,8 @@ var migrations = []Migration{
|
|||
NewMigration("remove is_owner, num_teams columns from org_user", removeIsOwnerColumnFromOrgUser),
|
||||
// v57 -> v58
|
||||
NewMigration("add closed_unix column for issues", addIssueClosedTime),
|
||||
// v58 -> v59
|
||||
NewMigration("add label descriptions", addLabelsDescriptions),
|
||||
}
|
||||
|
||||
// Migrate database to current version
|
||||
|
|
22
models/migrations/v58.go
Normal file
22
models/migrations/v58.go
Normal file
|
@ -0,0 +1,22 @@
|
|||
// Copyright 2018 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 (
|
||||
"fmt"
|
||||
|
||||
"github.com/go-xorm/xorm"
|
||||
)
|
||||
|
||||
func addLabelsDescriptions(x *xorm.Engine) error {
|
||||
type Label struct {
|
||||
Description string
|
||||
}
|
||||
|
||||
if err := x.Sync2(new(Label)); err != nil {
|
||||
return fmt.Errorf("Sync2: %v", err)
|
||||
}
|
||||
return nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue