2020-03-02 12:07:57 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class AddDefaultBranchProtectionToNamespaces < ActiveRecord::Migration[6.0]
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
2020-03-12 12:09:17 +00:00
|
|
|
def up
|
2020-03-02 12:07:57 +00:00
|
|
|
with_lock_retries do
|
2021-01-27 12:09:01 +00:00
|
|
|
add_column :namespaces, :default_branch_protection, :integer, limit: 2 # rubocop:disable Migration/AddColumnsToWideTables
|
2020-03-02 12:07:57 +00:00
|
|
|
end
|
|
|
|
end
|
2020-03-12 12:09:17 +00:00
|
|
|
|
|
|
|
def down
|
|
|
|
with_lock_retries do
|
|
|
|
remove_column :namespaces, :default_branch_protection
|
|
|
|
end
|
|
|
|
end
|
2020-03-02 12:07:57 +00:00
|
|
|
end
|