Add uniqueness check per project_id on push rule creation
What does this MR do and why?
Contributes to #493391
Problem
project_id column is not checked for uniqueness and database has
duplicated records.
Solution
Block the creation of push rule records when push rules for project are already defined.
References
Push rules: add a unique index by project_id (#493391)
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
- Go to Create new project page
- Use Create from template
- Select
NodeJS Expresstemplate - Create project
- Project will have multiple push rules records (before the fix)
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.
Related to #493391
Edited by Vasilii Iakliushin

