summaryrefslogtreecommitdiff
path: root/lib/gitlab/background_migration/add_merge_request_diff_commits_count.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/background_migration/add_merge_request_diff_commits_count.rb')
-rw-r--r--lib/gitlab/background_migration/add_merge_request_diff_commits_count.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/background_migration/add_merge_request_diff_commits_count.rb b/lib/gitlab/background_migration/add_merge_request_diff_commits_count.rb
index 7bffffec94d..d5cf9e0d53a 100644
--- a/lib/gitlab/background_migration/add_merge_request_diff_commits_count.rb
+++ b/lib/gitlab/background_migration/add_merge_request_diff_commits_count.rb
@@ -19,7 +19,7 @@ module Gitlab
WHERE merge_request_diffs.id = merge_request_diff_commits.merge_request_diff_id
)'.squish
- MergeRequestDiff.where(id: start_id..stop_id).update_all(update)
+ MergeRequestDiff.where(id: start_id..stop_id).where(commits_count: nil).update_all(update)
end
end
end