2017-04-05 22:53:57 +00:00
|
|
|
# rubocop:disable RemoveIndex
|
2018-11-13 07:27:31 +00:00
|
|
|
class AddIndexForLatestSuccessfulPipeline < ActiveRecord::Migration[4.2]
|
2017-02-16 14:19:24 +00:00
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
2017-03-07 16:08:53 +00:00
|
|
|
def up
|
2017-03-17 23:06:11 +00:00
|
|
|
add_concurrent_index(:ci_commits, [:gl_project_id, :ref, :status])
|
2017-03-07 16:08:53 +00:00
|
|
|
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
|