Commit ae22cb3c authored by Douwe Maan's avatar Douwe Maan

Merge branch '53991-add-partial-index-for-projects' into 'master'

Remove projects index on mirror and mirror_last_update_at

Closes gitlab-ce#53991

See merge request gitlab-org/gitlab-ee!8585
parents 697c2ced dacc714d
---
title: Remove partial index for projects on mirror and mirror_last_update_at
merge_request: 8585
author:
type: performance
# frozen_string_literal: true
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class RemoveProjectsIndexOnMirrorAndMirrorAt < ActiveRecord::Migration[5.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
remove_concurrent_index(*index_arguments)
end
def down
add_concurrent_index(*index_arguments)
end
private
def index_arguments
[
:projects,
[:mirror, :mirror_last_update_at],
{
name: 'index_projects_on_mirror_and_mirror_last_update_at',
where: 'mirror'
}
]
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment