Remove the `ForkedProjectLink` model
After https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14422 the information in the forked_project_links
table is duplicated in fork_networks
and fork_network_members
.
The new relations are being populated in background migrations, we need to double check that those are finished before we start removing ForkedProjectLink
.
The migrations handling this are PopulateForkNetworksRange
and CreateForkNetworkMembersRange
.
We need to clean this up throughout the code:
- Remove the relation in
Project
: When updating the relation, we need to pay attention to correctly handle theforked_from_project
relation. - Update the way we determine if a project is a fork in
Project
- Update the
Projects::ForkService
to only handle finding aForkNetwork
or creating one from the current project. - Lower the QueryCounter threshold in the
api/projects_spec.rb
/cc @DouweM