debian-mirror-gitlab/db/migrate/20200921203231_remove_duplicate_cluster_agents_index.rb
2021-01-03 14:25:43 +05:30

18 lines
406 B
Ruby

# frozen_string_literal: true
class RemoveDuplicateClusterAgentsIndex < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
INDEX = 'index_cluster_agents_on_project_id'
disable_ddl_transaction!
def up
remove_concurrent_index_by_name :cluster_agents, INDEX
end
def down
add_concurrent_index :cluster_agents, :project_id, name: INDEX
end
end