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

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

class AddIndexToVulnerabilityStatisticsOnLatestPipelineId < ActiveRecord::Migration[6.0]
  include Gitlab::Database::MigrationHelpers

  INDEX_NAME = 'index_vulnerability_statistics_on_latest_pipeline_id'

  disable_ddl_transaction!

  def up
    add_concurrent_index :vulnerability_statistics, :latest_pipeline_id, name: INDEX_NAME
  end

  def down
    remove_concurrent_index_by_name :vulnerability_statistics, INDEX_NAME
  end
end