Restore project fork links and forked merge requests for gitlab-org/gitlab
From #2889 (closed), we may have inadvertently caused forked projects to be unlinked from gitlab-org/gitlab.
There are approximately 4402 projects that might be forks of gitlab-org/gitlab:
gitlabhq_production=# select count(*) from routes where path like '%/gitlab';
count
-------
4402
(1 row)
It also appears that the updated_at timestamp isn't touched for projects that were unlinked. For example, my fork, stanhu/gitlab:
gitlabhq_production=# select * from routes where path = 'stanhu/gitlab';
id | source_id | source_type | path | created_at | updated_at | name
----------+-----------+-------------+---------------+----------------------------+----------------------------+------------------
21734177 | 15830194 | Project | stanhu/gitlab | 2019-12-12 04:03:59.373923 | 2019-12-12 04:03:59.373923 | Stan Hu / GitLab
(1 row)
gitlabhq_production=# select created_at, updated_at from projects where id = 15830194;
created_at | updated_at
-------------------------------+-------------------------------
2019-12-12 04:03:59.356253+00 | 2020-05-03 00:02:31.919122+00
(1 row)
We may just want to start with the projects that had merge requests closed.