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

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

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

  INDEX_NAME = 'index_project_incident_management_settings_on_p_id_sla_timer'

  def up
    add_concurrent_index :project_incident_management_settings, :project_id,
      name: INDEX_NAME,
      where: 'sla_timer = TRUE'
  end

  def down
    remove_concurrent_index_by_name :project_incident_management_settings, name: INDEX_NAME
  end
end