2020-07-06 09:09:20 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class AddSharedRunnersEnabledAndOverrideToNamespaces < ActiveRecord::Migration[6.0]
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
def up
|
|
|
|
with_lock_retries do
|
2021-01-27 12:09:01 +00:00
|
|
|
add_column :namespaces, :shared_runners_enabled, :boolean, default: true, null: false # rubocop:disable Migration/AddColumnsToWideTables
|
|
|
|
add_column :namespaces, :allow_descendants_override_disabled_shared_runners, :boolean, default: false, null: false # rubocop:disable Migration/AddColumnsToWideTables
|
2020-07-06 09:09:20 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
with_lock_retries do
|
|
|
|
remove_column :namespaces, :shared_runners_enabled, :boolean
|
|
|
|
remove_column :namespaces, :allow_descendants_override_disabled_shared_runners, :boolean
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|