Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20200921203231_remove_duplicate_cluster_agents_index.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3f073e32d848a227b0919283c9852507f9bc6e02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# 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