From 6c5266c9cadf500ec8a166066bf4452801cc2545 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Fri, 4 Sep 2020 03:36:56 +0200 Subject: [BugFix] Fix comment broken issue ref dependence (#12651) * deleteIssuesByRepoID: delete related CommentTypeRemoveDependency & CommentTypeAddDependency comments too * Ignore ErrIssueNotExist on comment.LoadDepIssueDetails() * Add migration * Ignore 'dependent_issue_id = 0' case * exchange as per @lunny Co-authored-by: techknowlogick --- models/migrations/migrations.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'models/migrations/migrations.go') diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go index 721b045fdc..6d27934f6d 100644 --- a/models/migrations/migrations.go +++ b/models/migrations/migrations.go @@ -228,6 +228,8 @@ var migrations = []Migration{ NewMigration("Add projects info to repository table", addProjectsInfo), // v147 -> v148 NewMigration("create review for 0 review id code comments", createReviewsForCodeComments), + // v148 -> v149 + NewMigration("remove issue dependency comments who refer to non existing issues", purgeInvalidDependenciesComments), } // GetCurrentDBVersion returns the current db version -- cgit v1.2.3