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.

36 lines
723 B

  1. // Copyright 2019 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 "xorm.io/xorm"
  6. func addOriginalMigrationInfo(x *xorm.Engine) error {
  7. // Issue see models/issue.go
  8. type Issue struct {
  9. OriginalAuthor string
  10. OriginalAuthorID int64
  11. }
  12. if err := x.Sync2(new(Issue)); err != nil {
  13. return err
  14. }
  15. // Issue see models/issue_comment.go
  16. type Comment struct {
  17. OriginalAuthor string
  18. OriginalAuthorID int64
  19. }
  20. if err := x.Sync2(new(Comment)); err != nil {
  21. return err
  22. }
  23. // Issue see models/repo.go
  24. type Repository struct {
  25. OriginalURL string
  26. }
  27. return x.Sync2(new(Repository))
  28. }