gitea源码

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright 2019 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package v1_10
  4. import "xorm.io/xorm"
  5. func AddOriginalMigrationInfo(x *xorm.Engine) error {
  6. // Issue see models/issue.go
  7. type Issue struct {
  8. OriginalAuthor string
  9. OriginalAuthorID int64
  10. }
  11. if err := x.Sync(new(Issue)); err != nil {
  12. return err
  13. }
  14. // Issue see models/issue_comment.go
  15. type Comment struct {
  16. OriginalAuthor string
  17. OriginalAuthorID int64
  18. }
  19. if err := x.Sync(new(Comment)); err != nil {
  20. return err
  21. }
  22. // Issue see models/repo.go
  23. type Repository struct {
  24. OriginalURL string
  25. }
  26. return x.Sync(new(Repository))
  27. }