Add legacy columns to partitioned commits table

What does this MR do and why?

Add legacy columns to partitioned commits table

Adds the seven columns that exist on merge_request_diff_commits but not on merge_request_diff_commits_b5377a7a34, as always-NULL compatibility columns.

The swap renames the partitioned table over the legacy one. Code paths guarded by mr_diff_commits_read_new_table being disabled still name sha, trailers, commit_author_id and the rest, so without these columns those queries raise PG::UndefinedColumn between the swap and the flag reaching 100%. Nothing writes them: create_bulk strips DEDUPLICATED_COLUMNS and trailers before insert.

References

https://gitlab.com/gitlab-org/gitlab/-/work_items/602841

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #527241

Edited by Eugenia Grieff

Merge request reports

Loading
Loading