Commit 9a886ecb authored by Patrick Derichs's avatar Patrick Derichs

Add index to resource_milestone_events

parent 11522d2a
---
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);
......@@ -13069,6 +13071,7 @@ COPY "schema_migrations" (version) FROM STDIN;
20200403184110
20200403185127
20200403185422
20200406135648
20200407094005
20200407094923
\.
......
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