debian-mirror-gitlab/db/migrate/20200409085956_add_partial_index_on_import_failures_retry_count.rb
2020-04-22 19:07:51 +05:30

18 lines
430 B
Ruby

# frozen_string_literal: true
class AddPartialIndexOnImportFailuresRetryCount < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :import_failures, [:project_id, :correlation_id_value], where: 'retry_count = 0'
end
def down
remove_concurrent_index :import_failures, [:project_id, :correlation_id_value]
end
end