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

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

class DropUuidAndIdIndexFromSecurityFindings < Gitlab::Database::Migration[2.0]
  INDEX_NAME = :index_on_security_findings_uuid_and_id_order_desc

  disable_ddl_transaction!

  def up
    remove_concurrent_index_by_name :security_findings, name: INDEX_NAME
  end

  def down
    add_concurrent_index :security_findings, [:uuid, :id], order: { id: :desc }, name: INDEX_NAME
  end
end