debian-mirror-gitlab/db/migrate/20200424102023_add_shared_runners_enabled_and_override_to_namespaces.rb

22 lines
761 B
Ruby
Raw Normal View History

2020-07-28 23:09:34 +05:30
# frozen_string_literal: true
class AddSharedRunnersEnabledAndOverrideToNamespaces < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
with_lock_retries do
2021-03-11 19:13:27 +05:30
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-28 23:09:34 +05:30
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