Skip to content

Replace foreign keys to use the partitioned table - 4

Marius Bobin requested to merge 414396-partitioned-fks-v4 into master

What does this MR do and why?

The ci_builds table is now a partition of the p_ci_builds routing table, but to finalize the partitioning we need to update all of the foreign keys that target ci_builds to use the routing table instead. This blocks us from adding new partitions to p_ci_builds since the other tables won't be able to enforce the constraints since the records will not be in the ci_builds table.

The migrations here create the foreign keys between the partitioned tables, the FKs between the partitions were created and validated asynchronously in previous MRs. We also need to reintroduce the for self-managed after they are successfully executed on .com.

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

Edited by Marius Bobin

Merge request reports

Loading