Backfill project_wiki_repositories table
What does this MR do and why?
As part of #367925 (closed), we introduced a new model to track project wiki repositories in the database. This MR backfills the project_wiki_repositories
table for projects that still do not have an entry in this table.
How to set up and validate locally
- Checkout the MR branch
git fetch --all git checkout 367925-backfill-project-wiki-repositories
- Run the database migrations
bundle exec rails db:migrate
- In a Rails console, check if the number of records in the
project_wiki_repositories
table matches the number of projectsProject.count == Projects::WikiRepository.count
Migrations
-
Raw SQL
SELECT projects.id FROM projects LEFT OUTER JOIN project_wiki_repositories ON project_wiki_repositories.project_id = projects.id WHERE project_wiki_repositories.project_id IS NULL LIMIT 1000
-
Query Plan
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related issue
Related to #367925 (closed)
Edited by Douglas Barbosa Alexandre