From ecfac78f6ef2cc01e4397c1a92b9a59b7ff0b2ff Mon Sep 17 00:00:00 2001 From: Romain Date: Wed, 29 Sep 2021 22:53:12 +0200 Subject: Kanban colored boards (#16647) Add a column Color in ProjectBoard and color picker in new / edit project board form. --- models/migrations/v196.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 models/migrations/v196.go (limited to 'models/migrations/v196.go') diff --git a/models/migrations/v196.go b/models/migrations/v196.go new file mode 100644 index 0000000000..c0332c7bb4 --- /dev/null +++ b/models/migrations/v196.go @@ -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 +} -- cgit v1.2.3