summaryrefslogtreecommitdiff
path: root/db/migrate/20180916011959_add_index_pipelines_project_id_source.rb
blob: b9bebf30cf0ffc878e36d61553246d5f20775ce8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.

class AddIndexPipelinesProjectIdSource < ActiveRecord::Migration
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  disable_ddl_transaction!

  def up
    add_concurrent_index :ci_pipelines, [:project_id, :source]
  end

  def down
    remove_concurrent_index :ci_pipelines, [:project_id, :source]
  end
end