Backfill project_id on Ci Stages
What does this MR do and why?
Related to sharding key work, in order to add a foreign key not null constraint to pipeline_id on ci_stages some records need to be backfilled and cleaned up. There are a small number of orphaned records that need to be removed. This is the first MR in a series of 3 that will add the project_id sharding key to Ci::Stages.
The backfill attempts to fill project ids on ci_stages
records through the pipeline association and deletes any that are not associated with a pipeline and essentially orphaned records.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
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.
Related to #458490