Add NOT NULL constraint for `remote_mirrors.project_id`
Problem
As part of our Organization Isolation work we are ensuring that all sharding keys are not nullable.
remote_mirrors
has a field project_id
that has nullable state, however it should be not nullable.
Suggestion
In %17.1 we removed remote mirror records with empty project_id
records (see Remove invalid remote mirror records without "p... (!146640 - merged)).
Next step, add a not null constraint and validation for project_id
field in remote_mirrors
table
See documentation: https://docs.gitlab.com/ee/development/database/not_null_constraints.html#add-a-not-null-constraint-to-an-existing-column
Edited by Vasilii Iakliushin