mirror of
https://github.com/go-gitea/gitea.git
synced 2025-06-20 05:07:16 +02:00
Kanban colored boards (#16647)
Add a column Color in ProjectBoard and color picker in new / edit project board form.
This commit is contained in:
@ -344,6 +344,8 @@ var migrations = []Migration{
|
||||
NewMigration("Add Branch Protection Unprotected Files Column", addBranchProtectionUnprotectedFilesColumn),
|
||||
// v195 -> v196
|
||||
NewMigration("Add table commit_status_index", addTableCommitStatusIndex),
|
||||
// v196 -> v197
|
||||
NewMigration("Add Color to ProjectBoard table", addColorColToProjectBoard),
|
||||
}
|
||||
|
||||
// GetCurrentDBVersion returns the current db version
|
||||
|
22
models/migrations/v196.go
Normal file
22
models/migrations/v196.go
Normal file
@ -0,0 +1,22 @@
|
||||
// Copyright 2021 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"
|
||||
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
func addColorColToProjectBoard(x *xorm.Engine) error {
|
||||
type ProjectBoard struct {
|
||||
Color string `xorm:"VARCHAR(7)"`
|
||||
}
|
||||
|
||||
if err := x.Sync2(new(ProjectBoard)); err != nil {
|
||||
return fmt.Errorf("Sync2: %v", err)
|
||||
}
|
||||
return nil
|
||||
}
|
Reference in New Issue
Block a user