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

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

class AddIndexCiJobArtifactsProjectIdCreatedAt < Gitlab::Database::Migration[1.0]
  INDEX_NAME = 'index_ci_job_artifacts_on_id_project_id_and_created_at'

  disable_ddl_transaction!

  def up
    add_concurrent_index :ci_job_artifacts, [:project_id, :created_at, :id], name: INDEX_NAME
  end

  def down
    remove_concurrent_index_by_name :ci_job_artifacts, INDEX_NAME
  end
end