Fix partition_id for ci_build_needs
Ref: #387301 (closed)
What does this MR do and why?
This MR fixes invalid ci_build_needs
records in production and sets the partition_id
to 100.
Merge only after
-
Completion of ci_builds migration - to avoid violating the FK constraint
Database
We have around ~37K records to fix so we don't need a batched migration here as discussed on slack.
We need to wait for ci_builds
migration to be executed in order to test this out properly with database-testing-automation.
select count(*) from ci_build_needs where partition_id = 101;
UPDATE ci_build_needs
SET partition_id = 100
WHERE ci_build_needs.id BETWEEN 100000 AND 100100
AND ci_build_needs.partition_id = 101
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