2017-02-16 14:19:24 +00:00
|
|
|
class AddIndexForLatestSuccessfulPipeline < ActiveRecord::Migration
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
2017-03-07 16:08:53 +00:00
|
|
|
def up
|
|
|
|
add_concurrent_index :ci_commits, [:gl_project_id, :ref, :status]
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
remove_index :ci_commits, [:gl_project_id, :ref, :status] if index_exists? :ci_commits, [:gl_project_id, :ref, :status]
|
2017-02-16 14:19:24 +00:00
|
|
|
end
|
|
|
|
end
|