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

20220125230538_add_compound_index_on_project_id_and_id_for_vulnerabilities.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c745fa51328e2d9427b3dc0d92d714bbca9f47c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

class AddCompoundIndexOnProjectIdAndIdForVulnerabilities < Gitlab::Database::Migration[1.0]
  INDEX_NAME = 'index_vulnerabilities_on_project_id_and_id'

  disable_ddl_transaction!

  def up
    add_concurrent_index :vulnerabilities, [:project_id, :id], name: INDEX_NAME
  end

  def down
    remove_concurrent_index :vulnerabilities, [:project_id, :id], name: INDEX_NAME
  end
end