gitlab-org--gitlab-foss/db/migrate/20191120200015_add_index_to_grafana_integrations.rb

16 lines
341 B
Ruby
Raw Normal View History

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