Add FKs including partition_id referencing ci_builds
Ref: #382033 (closed)
What does this MR do and why?
Step 1 to redefine FK referencing ci_buids
.
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 models.
Ci::UnitTestFailure
Ci::BuildPendingState
Ci::BuildTraceChunk
And follow a simple strategy using only post migrations as this reference ci_builds a high-traffic table:
- Creates an index
- Creates the FK
- Validates the FK within its own migration for retrying purpose
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