Add FK including partition_id to ci_builds_runner_session
Ref: #382033 (closed)
What does this MR do and why?
Step 4 to redefine FK referencing ci_builds
.
This MR creates the following migrations to redefine our FK to include the partition_id
in order to partition ci_builds
.
It takes care of the following model.
Ci::BuildRunnerSession
And follow a simple strategy using only post migrations as this reference ci_builds a high-traffic table:
- Creates an index
- Creates the FK
- Do not validate the FK as it takes 4 hours, it will be done in a Change Request during low traffic over the weekend
This is a similar approach we implemented in !107476 (merged).
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.
Edited by Max Orefice