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

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

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

  INDEX_NAME = 'index_issues_on_description_trigram'

  def up
    remove_concurrent_index_by_name :issues, name: INDEX_NAME
  end

  def down
    disable_statement_timeout do
      execute <<-SQL
        CREATE INDEX CONCURRENTLY IF NOT EXISTS #{INDEX_NAME} ON issues
          USING gin (description gin_trgm_ops) WITH (fastupdate='false')
      SQL
    end
  end
end