2019-02-15 15:39:39 +05:30
|
|
|
class RemoveTmpPartialNullIndexFromBuilds < ActiveRecord::Migration[4.2]
|
2018-03-27 19:54:05 +05:30
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
|
|
|
def up
|
|
|
|
remove_concurrent_index_by_name(:ci_builds, 'tmp_id_partial_null_index')
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
add_concurrent_index(:ci_builds, :id, where: 'stage_id IS NULL',
|
|
|
|
name: 'tmp_id_partial_null_index')
|
|
|
|
end
|
|
|
|
end
|