Commit c62f76db authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch '38096-add-index-on-resource-milestone-events-created-at-pd' into 'master'

Add index to resource_milestone_events

See merge request gitlab-org/gitlab!28929
parents 1267617d 9a886ecb
---
title: Add index for created_at of resource_milestone_events
merge_request: 28929
author:
type: performance
# frozen_string_literal: true
class AddIndexToCreatedAtOnResourceMilestoneEvents < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
INDEX_NAME = 'index_resource_milestone_events_created_at'
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :resource_milestone_events, :created_at, name: INDEX_NAME
end
def down
remove_concurrent_index_by_name :resource_milestone_events, INDEX_NAME
end
end
......@@ -10036,6 +10036,8 @@ CREATE INDEX index_resource_label_events_on_merge_request_id ON public.resource_
CREATE INDEX index_resource_label_events_on_user_id ON public.resource_label_events USING btree (user_id);
CREATE INDEX index_resource_milestone_events_created_at ON public.resource_milestone_events USING btree (created_at);
CREATE INDEX index_resource_milestone_events_on_issue_id ON public.resource_milestone_events USING btree (issue_id);
CREATE INDEX index_resource_milestone_events_on_merge_request_id ON public.resource_milestone_events USING btree (merge_request_id);
......@@ -13070,6 +13072,7 @@ COPY "schema_migrations" (version) FROM STDIN;
20200403184110
20200403185127
20200403185422
20200406135648
20200407094005
20200407094923
20200408110856
......
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