Skip to content

Add NOT NULL for sharding key on deployment_approvals

What does this MR do and why?

Adds NOT NULL constraint on sharding key column project_id on table: deployment_approvals.

This merge request is the last step towards transforming the desired sharding key into a sharding key.

This involves the following changes:

  • Adding a not null constraint for the sharding key column (project_id).
  • Setting project_id as sharding_key of deployment_approvals.

How to verify

We have assigned a random backend engineer from groupenvironments to review these changes. Please review this merge request from a backend perspective. The main thing we are looking to verify is that the BackfillDeploymentApprovalsProjectId batched background migration has been successfully finalized in a previous merge request, and that the constraint matches the column specified by the desired sharding key configuration.

When you are finished, please:

  1. Trigger the database testing pipeline as instructed by Danger.
  2. Request a review from the backend maintainer and database reviewer suggested by Danger.

If you have any questions or concerns, reach out to @tigerwnz or @manojmj.

This merge request was generated by a once off keep implemented in !143774

This change was generated by gitlab-housekeeper using the Keeps::BackfillDesiredShardingKeySmallTableStep3 keep.

To provide feedback on your experience with gitlab-housekeeper please create an issue with the label GitLab Housekeeper and consider pinging the author of this keep.

Merge request reports