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

20160705055813_remove_developers_can_merge_from_protected_branches.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4a7bde7f9f33774f14e95bac9647bcd0b68b6629 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.

class RemoveDevelopersCanMergeFromProtectedBranches < ActiveRecord::Migration
  include Gitlab::Database::MigrationHelpers

  # This is only required for `#down`
  disable_ddl_transaction!

  DOWNTIME = false

  def up
    remove_column :protected_branches, :developers_can_merge, :boolean
  end

  def down
    add_column_with_default(:protected_branches, :developers_can_merge, :boolean, default: false, allow_null: false)
  end
end