Replace foreign keys to use the partitioned table - V3
What does this MR do and why?
These foreign keys were added on .com via !123355 (merged) and validated asynchronously. Now we need to add them for self-managed and validate them everywhere else.
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.
p_ci_builds_metadata
and p_ci_runner_machine_builds
are partitioned and they need an extra step, so they are not handled by this MR.
Screenshots or screen recordings
How to set up and validate locally
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #414396 (closed)