Skip to content

Add NOT NULL on sharding key for ci_build_needs

What does this MR do and why?

Adds NOT NULL constraint on the sharding key column project_id on table: ci_build_needs. The constraint will be validated asynchronously because the table's size is overlimit.

Note: We do not add presence: true check because we're relying on "BEFORE INSERT OR UPDATE" trigger to populate the column from its parent table. We have no defined plan yet for the removal of these triggers but we will ensure that application code is writing the value first removing them.

References

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

N/A

How to verify

N/A

Edited by Shane Maglangit

Merge request reports

Loading