Add migration to add count fields to projects
What does this MR do and why?
Add star_count, issue_count, merge_request_count and last_repository_updated_date to projects index.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Make sure you have
elasticsearch
enabled locally. - In the rails console, enter
Elastic::DataMigrationService[20240208160152].send(:migration).migrate
or you can also runbin/rails gitlab:elastic:index
- Create a new project and then see in the elasticsearch database you would see new fields (
star_count
,merge_request_count
,issue_count
andlast_repository_updated_date
)
Related to #428072 (closed)
Edited by Siddharth Dungarwal