Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20180523125103_cleanup_merge_requests_allow_maintainer_to_push_rename.rb « post_migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7eca7394f5f83f391dea63743e68addbb865c096 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class CleanupMergeRequestsAllowMaintainerToPushRename < ActiveRecord::Migration
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  disable_ddl_transaction!

  def up
    # NOOP
  end

  def down
    if column_exists?(:merge_requests, :allow_collaboration)
      # rubocop:disable Migration/UpdateLargeTable
      rename_column_concurrently :merge_requests, :allow_collaboration, :allow_maintainer_to_push
    end
  end
end