Follow-up from "Resolve "Store the number of merge request commits in merge_request_diffs.commits_count""
!16164 (merged) introduced a new background migration which adds commits_count column to marge request diffs. In a next cycle we need to:
- add an additional migration which sets commits_count for any remaining records (https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16164#note_53027118)
- bump import/export version number because of the new commits_count attribute (https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16164#note_53027501)
- remove the fallback code for commits_count:
def commits_count
super || merge_request_diff_commits.size
end
Edited by Jan Provaznik