Project push rules: Add missing attributes for project_id field
Implementation plan
Now that we have organization_push_rules and group_push_rules we should start using push_rules as dedicated table for projects. To achieve this we should perform the following changes:
- Create a migration to make
project_idto beNOT NULL(https://docs.gitlab.com/development/database/not_null_constraints/#add-a-not-null-column-to-an-existing-table). - Create a migration to add a concurrent foreign key for
project_id(https://docs.gitlab.com/development/database/foreign_keys/#adding-foreign-keys-in-migrations). - Add sharding key for
project_id(https://docs.gitlab.com/development/cells/#defining-a-sharding-key-for-all-organizational-tables).
Expectations
- Validate that
push_rulestable does not have records withNULLvalues forproject_id. - Create the corresponding migrations and necessary tests.
- Coordinate the corresponding database review.
Edited by 🤖 GitLab Bot 🤖