2018-03-17 18:26:18 +05:30
|
|
|
# rubocop:disable Migration/RemoveColumn
|
2016-09-13 17:45:13 +05:30
|
|
|
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
|
|
|
|
# for more information on how to write migrations for GitLab.
|
|
|
|
|
2018-12-23 12:14:25 +05:30
|
|
|
class RemoveDevelopersCanPushFromProtectedBranches < ActiveRecord::Migration[4.2]
|
2016-09-13 17:45:13 +05:30
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
# This is only required for `#down`
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
def up
|
|
|
|
remove_column :protected_branches, :developers_can_push, :boolean
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
add_column_with_default(:protected_branches, :developers_can_push, :boolean, default: false, allow_null: false)
|
|
|
|
end
|
|
|
|
end
|