Add NOT NULL (NOT VALID) constraint on gpg_signatures#project_id

What does this MR do and why?

Add NOT NULL (NOT VALID) constraint on gpg_signatures#project_id

Epic: &11670

Addresses #555251

There are noo rows where project_id is NULL: https://postgres.ai/console/gitlab/gitlab-production-main/sessions/42015/commands/129065

This is a large table (https://postgres.ai/console/gitlab/gitlab-production-main/sessions/42015/commands/129066) and I will shard it in two steps: 1- (this MR) add a not null constraint with validate: false + prepare an asyn constraint validation 2- (another MR) validate project_id NOT NULL

MR acceptance checklist

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

Merge request reports

Loading