summaryrefslogtreecommitdiff
path: root/db/migrate/20200729202222_add_index_to_ci_pipeline_project_id_created_at.rb
blob: d1ee9c49d306eb571eb7a1977f0cc7fe4a2cca93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

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

  DOWNTIME = false

  disable_ddl_transaction!

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

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