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

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

class PrepareIndexForOpenIssuesCount < Gitlab::Database::Migration[2.0]
  INDEX_NAME = 'idx_open_issues_on_project_id_and_confidential'

  def up
    prepare_async_index :issues, [:project_id, :confidential], where: 'state_id = 1', name: INDEX_NAME
  end

  def down
    unprepare_async_index_by_name :issues, INDEX_NAME
  end
end