20181106135939_add_index_to_deployments.rb 374 Bytes
Newer Older
1 2
# frozen_string_literal: true

3
class AddIndexToDeployments < ActiveRecord::Migration[4.2]
4 5 6 7 8 9 10
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  disable_ddl_transaction!

  def up
11
    add_concurrent_index :deployments, [:project_id, :status, :created_at]
12 13 14
  end

  def down
15
    remove_concurrent_index :deployments, [:project_id, :status, :created_at]
16 17
  end
end