Skip to content

Adding not-null constraint on project_id for ci_pipelines

Max Fan requested to merge 463405-not-null-model-validation-ci-pipelines into master

What does this MR do and why?

Adding not-null constraint on project_id for ci_pipelines

Adding model validation as .com is finished patching Adding db migration for SM users

Using joebot, we can see the check constraint has already been added to Gitlab.com and has been validated

Check constraints:
    "check_2ba2a044b9" CHECK (project_id IS NOT NULL)
    "check_d7e99a025e" CHECK (lock_version IS NOT NULL)

This is following https://docs.gitlab.com/ee/development/database/not_null_constraints.html#not-null-constraints-on-large-tables help-doc

1st MR: batched background migration & backfilling

2nd MR: finalizing background migration & prepare validation of check constraint

3rd MR: This one - model validation and check constraint for SM

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

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Related to #463405 (closed)

Edited by Max Fan

Merge request reports

Loading