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

20180418053107_add_index_to_ci_job_artifacts_file_store.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4b574923483e06936780e448966933bcc275e8bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class AddIndexToCiJobArtifactsFileStore < ActiveRecord::Migration[4.2]
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  disable_ddl_transaction!

  def up
    add_concurrent_index :ci_job_artifacts, :file_store
  end

  def down
    # rubocop:disable Migration/RemoveIndex
    remove_index :ci_job_artifacts, :file_store if index_exists?(:ci_job_artifacts, :file_store)
  end
end