2021-02-05 04:09:10 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-12-03 10:06:20 -05:00
|
|
|
class AddIndexToGrafanaIntegrations < ActiveRecord::Migration[5.2]
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
|
|
|
def up
|
|
|
|
add_concurrent_index :grafana_integrations, :enabled, where: 'enabled IS TRUE'
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
remove_concurrent_index :grafana_integrations, :enabled
|
|
|
|
end
|
|
|
|
end
|