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

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

class AddIndexToCiJobArtifactsForTerraformReportsId < ActiveRecord::Migration[6.0]
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false
  INDEX_NAME = 'index_ci_job_artifacts_id_for_terraform_reports'

  disable_ddl_transaction!

  def up
    add_concurrent_index :ci_job_artifacts, :id, where: 'file_type = 18', name: INDEX_NAME
  end

  def down
    remove_concurrent_index_by_name :ci_job_artifacts, INDEX_NAME
  end
end