20160715134306_add_index_for_pipeline_user_id.rb 314 字节
Newer Older
1 2 3
class AddIndexForPipelineUserId < ActiveRecord::Migration
  include Gitlab::Database::MigrationHelpers

D
Douwe Maan 已提交
4 5
  DOWNTIME = false

6 7
  disable_ddl_transaction!

8
  def up
K
Kamil Trzcinski 已提交
9
    add_concurrent_index :ci_commits, :user_id
10
  end
11 12 13 14

  def down
    remove_index :ci_commits, :user_id if index_exists? :ci_commits, :user_id
  end
15
end