Add multiple MR assignees migration and background table population
What does this MR do?
- Add migration required for multiple assignees
- Add post-deployment migration which schedules batches background migrations to insert
- Add a
after_savecallback to keep
merge_request_assigneesin sync while the migrations doesn't finishes and the codebase is still not using the relation
EE-port gitlab-ee!10411 (merged)
Query generated on background migration
INSERT INTO merge_request_assignees (merge_request_id, user_id) SELECT "merge_requests"."id", "merge_requests"."assignee_id" FROM "merge_requests" WHERE (NOT EXISTS (SELECT 1 FROM merge_request_assignees WHERE (merge_request_assignees.merge_request_id = merge_requests.id) ) AND ("merge_requests"."id" BETWEEN 1 AND 4) AND (assignee_id IS NOT NULL)
What are the relevant issue numbers?
Part of gitlab-ee#2004 (closed)
Does this MR meet the acceptance criteria?
- [ ] Changelog entry added, if necessary
- Documentation created/updated via this MR
- Documentation reviewed by technical writer or follow-up review issue created
- Tests added for this feature/bug
- Tested in all supported browsers
- Conforms to the code review guidelines
- Conforms to the merge request performance guidelines
- Conforms to the style guides
- Conforms to the database guides
- Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process.
- Security reports checked/validated by reviewer