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

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

class AddPipelineMetadataNameIndex < Gitlab::Database::Migration[2.0]
  disable_ddl_transaction!

  INDEX_NAME = 'index_pipeline_metadata_on_pipeline_id_name_lower_text_pattern'

  def up
    add_concurrent_index :ci_pipeline_metadata, 'pipeline_id, lower(name) text_pattern_ops', name: INDEX_NAME
  end

  def down
    remove_concurrent_index_by_name :ci_pipeline_metadata, INDEX_NAME
  end
end