You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

v299.go 659B

12345678910111213141516171819202122
  1. // Copyright 2024 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package v1_23 //nolint
  4. import (
  5. "xorm.io/xorm"
  6. )
  7. // CommentMetaData stores metadata for a comment, these data will not be changed once inserted into database
  8. type CommentMetaData struct {
  9. ProjectColumnID int64 `json:"project_column_id"`
  10. ProjectColumnTitle string `json:"project_column_title"`
  11. ProjectTitle string `json:"project_title"`
  12. }
  13. func AddCommentMetaDataColumn(x *xorm.Engine) error {
  14. type Comment struct {
  15. CommentMetaData *CommentMetaData `xorm:"JSON TEXT"` // put all non-index metadata in a single field
  16. }
  17. return x.Sync(new(Comment))
  18. }