Add support for *_path de-duplication to mrd_files
As part of the partitioning/sharding/DB size work:
Add support for
*_pathde-duplication in Rails
-
Add custom getter in MergeRequestDiffFileto returnold_pathwhennew_pathisNULL-
We should also look at DiffFile#to_hash(this is inapp/models/concern). This method is called whenever we build theGitlab::Git::DiffCollectionbased onMergeRequestDiffFiles.
-
- Update
*_pathvalues before they get to the DB-
Add before_validationto setnew_path = nil if old_path == new_path- Blocked by #559142 (closed)
-
Update MergeRequestDiff#build_merge_request_diff_filesas we build the rows we bulk insert. (seeMergeRequestDiff#save_diffs)
-
Edited by Kerri Miller