You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by GitBox <gi...@apache.org> on 2022/09/21 02:44:01 UTC

[GitHub] [incubator-devlake] likyh commented on a diff in pull request #3135: fix: fix migrator bug

likyh commented on code in PR #3135:
URL: https://github.com/apache/incubator-devlake/pull/3135#discussion_r975983321


##########
models/migrationscripts/20220913_commitfile_add_length.go:
##########
@@ -67,24 +68,49 @@ func (CommitFileComponentBak) TableName() string {
 
 type addCommitFilePathLength struct{}
 
-func (*addCommitFilePathLength) Up(ctx context.Context, db *gorm.DB) errors.Error {
-	err := db.Migrator().RenameTable(&CommitFile{}, &CommitFileAddLengthBak{})
+func (*addCommitFilePathLength) Up(ctx context.Context, db *gorm.DB) (errs errors.Error) {
+	var err error
+
+	// rename the commit_file_bak to cache old table
+	err = db.Migrator().RenameTable(&CommitFile{}, &CommitFileAddLengthBak{})

Review Comment:
   `CommitFile` not defined in this file. is it `CommitFileAddLength`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org