Commit Graph

3 Commits

Author SHA1 Message Date
Jan Provaznik 0fc9f9d3e7 Add version 4.2 to all existing migrations
DB schema generated by a migration may look different in
rails 4 and 5 (because rails 5 may use different default values).
For this reason it's important to explicitly set for which rails
version a migration was written for.

See https://stackoverflow.com/questions/35929869/activerecordmigration-deprecation-warning-asks-for-rails-version-but-im-no/35930912#35930912
2018-11-22 13:18:28 +01:00
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
Bob Van Landuyt df7f530d84 Add a migration to populate fork networks
This uses the existing ForkedProjectLinks
2017-10-07 11:46:23 +02:00