gitlab-org--gitlab-foss/db/migrate/20170929131201_populate_fork_networks.rb
Bob Van Landuyt 7e00adcc71 Early migrations populating fork-networks: no-op
Since populating the fork networks was scheduled multiple times
because of bugs that needed to be fixed:

- https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/15595/
  Creating fork networks for projects that were missing the root of
  the fork network.

- https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/15709
  The API allowed creating forked_project_links without
  fork_network_members.

Scheduling this migration multiple times would case it to run
concurrently. Which in turn would try to insert the same data into
`fork_network_members` causing duplicate key errors.

This avoids running the migration multiple times.
2018-02-08 09:44:58 +01:00

16 lines
401 B
Ruby

# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class PopulateForkNetworks < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
say 'Fork networks will be populated in 20171205190711 - RescheduleForkNetworkCreationCaller'
end
def down
# nothing
end
end