debian-mirror-gitlab/db/migrate/20200914104642_modify_merge_request_api_index.rb
2020-11-24 15:15:51 +05:30

20 lines
670 B
Ruby

# frozen_string_literal: true
# See https://docs.gitlab.com/ee/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class ModifyMergeRequestApiIndex < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :merge_requests, [:target_project_id, :created_at, :id], name: :index_merge_requests_on_target_project_id_and_created_at_and_id
end
def down
remove_concurrent_index :merge_requests, [:target_project_id, :created_at, :id], name: :index_merge_requests_on_target_project_id_and_created_at_and_id
end
end