debian-mirror-gitlab/db/migrate/20191029191901_add_enabled_to_grafana_integrations.rb

24 lines
473 B
Ruby
Raw Normal View History

2019-12-26 22:10:19 +05:30
# frozen_string_literal: true
class AddEnabledToGrafanaIntegrations < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
2020-05-24 23:13:21 +05:30
add_column_with_default( # rubocop:disable Migration/AddColumnWithDefault
2019-12-26 22:10:19 +05:30
:grafana_integrations,
:enabled,
:boolean,
allow_null: false,
default: false
)
end
def down
remove_column(:grafana_integrations, :enabled)
end
end