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

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

class IndexFindingIdForVulnerabilities < Gitlab::Database::Migration[2.1]
  INDEX_NAME = 'index_vulnerabilities_on_finding_id'

  # TODO: Index to be created synchronously in https://gitlab.com/gitlab-org/gitlab/-/issues/423541
  def up
    prepare_async_index :vulnerabilities, :finding_id, name: INDEX_NAME
  end

  def down
    unprepare_async_index :vulnerabilities, INDEX_NAME
  end
end