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

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

class PrepareIssuesWorkItemTypeIdProjectIdIndex < Gitlab::Database::Migration[2.1]
  INDEX_NAME = 'index_issues_on_work_item_type_id_project_id_created_at_state'

  # TODO: Index to be created synchronously in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/121297
  def up
    prepare_async_index :issues, [:work_item_type_id, :project_id, :created_at, :state_id], name: INDEX_NAME
  end

  def down
    unprepare_async_index :issues, [:work_item_type_id, :project_id, :created_at, :state_id], name: INDEX_NAME
  end
end