Commit Graph

5 Commits

Author SHA1 Message Date
Bob Van Landuyt 0478ff7cd4 Handle uniqueness on fork_network_member creation
Since the migration might be queued already and be rescheduled when it
fails on a uniqueness error, this should help clearing the background
migration queue faster.
2018-02-08 09:44:58 +01:00
Yorick Peterse b3331cf3df
Added Rubocop config for background migrations
This adds a Rubocop configuration file specific to
lib/gitlab/background_migrations. This configuration will be used to
(hopefully) make reviewing background migrations easier by enforcing
stricter rules compared to the rest of GitLab. Because this
configuration is directory specific it will only affect background
migrations.
2017-11-23 13:56:51 +01:00
Bob Van Landuyt aaf18bb8c8 Don't try to create fork network memberships for forks of forks
In case the root project of a Fork-of-fork is deleted, the ForkNetwork
and the membership for that fork network is never created. In this
case we shouldn't try to create the membership, since the parent
membership will never be created.

This means that these fork networks will be lost.
2017-11-14 11:19:19 +01:00
Bob Van Landuyt 392e5df796 Don't create fork networks for root projects that are deleted 2017-10-09 08:44:23 +02:00
Bob Van Landuyt df7f530d84 Add a migration to populate fork networks
This uses the existing ForkedProjectLinks
2017-10-07 11:46:23 +02:00