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.

v72.go 723B

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2018 The Gitea Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package migrations
  5. import (
  6. "fmt"
  7. "code.gitea.io/gitea/modules/timeutil"
  8. "xorm.io/xorm"
  9. )
  10. func addReview(x *xorm.Engine) error {
  11. // Review see models/review.go
  12. type Review struct {
  13. ID int64 `xorm:"pk autoincr"`
  14. Type string
  15. ReviewerID int64 `xorm:"index"`
  16. IssueID int64 `xorm:"index"`
  17. Content string
  18. CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
  19. UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`
  20. }
  21. if err := x.Sync2(new(Review)); err != nil {
  22. return fmt.Errorf("Sync2: %v", err)
  23. }
  24. return nil
  25. }