code.gitea.io/gitea@v1.21.7/models/migrations/v1_10/v89.go (about)

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