Skip to content

Draft: Add column merge_requests.project_id and start backfill

What does this MR do and why?

Add column merge_requests.project_id and start backfill

This is for #429174 (closed) adding the sharding key for this table. It backfills it from target_project_id as this is NOT NULL and generally the main project we consider the MR associated with. In our Cells/Organizations plans we won't allow forks across organizations so technically even there the source_project_id must be in the same organization and therefore the same sharding key ultimately.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #429174 (closed)

Merge request reports