Skip to content

Use partitioned foreign key between ci_builds and ci_stages

Marius Bobin requested to merge 439065-update-constraints into master

What does this MR do and why?

Use partitioned foreign key between ci_builds and ci_stages

It adds a foreign key between ci_builds and ci_stages routing tables in order for new partitions to reference rows corectly. It also removes the old foreign key in the process.

These migrations were previously reverted with !146890 (merged) because of deadlock errors, but now the application uses the partitioned table to interact with ci_stages, so it should not error out.

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 #439065 (closed)

Edited by Marius Bobin

Merge request reports