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

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

class AddIndexToVulnerabilityFindingsOnUuidAgain < Gitlab::Database::Migration[2.1]
  INDEX_NAME = 'index_vuln_findings_on_uuid_including_vuln_id'

  def up
    Gitlab::Database::AsyncIndexes::PostgresAsyncIndex.where(name: INDEX_NAME).find_each do |record|
      record.definition = record.definition.strip
      record.save!
    end
  end

  def down
    # no-op
  end
end