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

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

class AddIdxIssuesOnWorkItemTypeProjectClosedAtWhereClosed < Gitlab::Database::Migration[2.1]
  INDEX_NAME = 'idx_issues_on_project_work_item_type_closed_at_where_closed'

  disable_ddl_transaction!

  def up
    add_concurrent_index :issues, [:project_id, :work_item_type_id, :closed_at], where: 'state_id = 2', name: INDEX_NAME
  end

  def down
    remove_concurrent_index_by_name :issues, INDEX_NAME
  end
end