Re-point referenced FKs to p_ci_job_artifacts
Problem
The tables that reference the initial partition must be updated to point to the parent table now. Without this change, the records from those tables will not be able to locate the rows in the next partitions because they will look for them in the initial partition.
Solution
Update the following FKs to the parent table (p_ci_job_artifacts)
-
Async validation for gitlab.com, !144569 (merged) -
Validation for self-managed, !145111 (merged) -
Clean up old FK name, !145216 (merged)
Referenced by:
TABLE "ci_build_trace_metadata" CONSTRAINT "fk_21d25cac1a_p" FOREIGN KEY (partition_id, trace_artifact_id) REFERENCES ci_job_artifacts(partition_id, id) ON UPDATE CASCADE ON DELETE CASCADE
TABLE "ci_job_artifact_states" CONSTRAINT "fk_rails_80a9cba3b2_p" FOREIGN KEY (partition_id, job_artifact_id) REFERENCES ci_job_artifacts(partition_id, id) ON UPDATE CASCADE ON DELETE CASCADE
Edited by Max Orefice