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

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

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

  INDEX_NAME = 'tmp_index_system_note_metadata_on_id_where_task'

  def up
    remove_concurrent_index_by_name :system_note_metadata, INDEX_NAME
  end

  def down
    add_concurrent_index :system_note_metadata, [:id, :action], where: "action = 'task'", name: INDEX_NAME
  end
end