mirror of
https://github.com/go-gitea/gitea.git
synced 2025-04-24 02:18:46 +03:00

Fix #2616 This PR adds a new sort option for exclusive labels. For exclusive labels, a new property is exposed called "order", while in the UI options are populated automatically in the `Sort` column (see screenshot below) for each exclusive label scope. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
17 lines
302 B
Go
17 lines
302 B
Go
// Copyright 2025 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package v1_24 //nolint
|
|
|
|
import (
|
|
"xorm.io/xorm"
|
|
)
|
|
|
|
func AddExclusiveOrderColumnToLabelTable(x *xorm.Engine) error {
|
|
type Label struct {
|
|
ExclusiveOrder int `xorm:"DEFAULT 0"`
|
|
}
|
|
|
|
return x.Sync(new(Label))
|
|
}
|