2018-11-13 07:27:31 +00:00
|
|
|
class RemoveTmpPartialNullIndexFromBuilds < ActiveRecord::Migration[4.2]
|
2018-02-20 12:53:54 +00:00
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
|
|
|
def up
|
2018-02-21 08:27:07 +00:00
|
|
|
remove_concurrent_index_by_name(:ci_builds, 'tmp_id_partial_null_index')
|
2018-02-20 12:53:54 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
2018-02-21 08:27:07 +00:00
|
|
|
add_concurrent_index(:ci_builds, :id, where: 'stage_id IS NULL',
|
|
|
|
name: 'tmp_id_partial_null_index')
|
2018-02-20 12:53:54 +00:00
|
|
|
end
|
|
|
|
end
|