mirror of
https://github.com/go-gitea/gitea
synced 2024-12-29 02:15:56 +01:00
791d7fc76a
Fix #27278 Replace #27816 This PR adds a meta-comment for an issue when dragging an issue from one column to another of a project. <img width="600" alt="image" src="https://github.com/go-gitea/gitea/assets/81045/5fc1d954-430e-4db0-aaee-a00006fa91f5"> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: yp05327 <576951401@qq.com>
24 lines
660 B
Go
24 lines
660 B
Go
// Copyright 2024 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package v1_23 //nolint
|
|
|
|
import (
|
|
"xorm.io/xorm"
|
|
)
|
|
|
|
// CommentMetaData stores metadata for a comment, these data will not be changed once inserted into database
|
|
type CommentMetaData struct {
|
|
ProjectColumnID int64 `json:"project_column_id"`
|
|
ProjectColumnTitle string `json:"project_column_title"`
|
|
ProjectTitle string `json:"project_title"`
|
|
}
|
|
|
|
func AddCommentMetaDataColumn(x *xorm.Engine) error {
|
|
type Comment struct {
|
|
CommentMetaData *CommentMetaData `xorm:"JSON TEXT"` // put all non-index metadata in a single field
|
|
}
|
|
|
|
return x.Sync(new(Comment))
|
|
}
|