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

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

class AddIndexToViolationsOnTargetProjIdSync < Gitlab::Database::Migration[2.1]
  TABLE_NAME = 'merge_requests_compliance_violations'
  INDEX_NAME = 'i_compliance_violations_for_export'

  disable_ddl_transaction!

  def up
    add_concurrent_index TABLE_NAME, [:target_project_id, :id], name: INDEX_NAME
  end

  def down
    remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
  end
end