Commit 0cc58b13 authored by Toon Claes's avatar Toon Claes

Improve the naming on the indexes

parent c30983d6
......@@ -7,8 +7,8 @@ class AddAuthorIdIndexToAuditEvents < ActiveRecord::Migration[6.0]
disable_ddl_transaction!
INDEX_NAME = 'index_on_entity_id_and_entity_type_and_id_desc_and_author_id'.freeze
OLD_INDEX_NAME = 'index_audit_events_on_entity_id_and_entity_type_and_id_desc'.freeze
INDEX_NAME = 'index_audit_events_on_entity_id_entity_type_id_desc_author_id'
OLD_INDEX_NAME = 'index_audit_events_on_entity_id_and_entity_type_and_id_desc'
def up
add_concurrent_index(:audit_events, [:entity_id, :entity_type, :id, :author_id], order: { id: :desc }, name: INDEX_NAME)
......
......@@ -9419,6 +9419,8 @@ CREATE INDEX index_approvers_on_target_id_and_target_type ON public.approvers US
CREATE INDEX index_approvers_on_user_id ON public.approvers USING btree (user_id);
CREATE INDEX index_audit_events_on_entity_id_entity_type_id_desc_author_id ON public.audit_events USING btree (entity_id, entity_type, id DESC, author_id);
CREATE INDEX index_audit_events_on_ruby_object_in_details ON public.audit_events USING btree (id) WHERE (details ~~ '%ruby/object%'::text);
CREATE INDEX index_award_emoji_on_awardable_type_and_awardable_id ON public.award_emoji USING btree (awardable_type, awardable_id);
......@@ -10467,8 +10469,6 @@ CREATE UNIQUE INDEX index_oauth_applications_on_uid ON public.oauth_applications
CREATE INDEX index_oauth_openid_requests_on_access_grant_id ON public.oauth_openid_requests USING btree (access_grant_id);
CREATE INDEX index_on_author_id_and_entity_id_and_entity_type_and_id_desc ON public.audit_events USING btree (entity_id, entity_type, id DESC, author_id);
CREATE UNIQUE INDEX index_on_deploy_keys_id_and_type_and_public ON public.keys USING btree (id, type) WHERE (public = true);
CREATE INDEX index_on_id_partial_with_legacy_storage ON public.projects USING btree (id) WHERE ((storage_version < 2) OR (storage_version IS NULL));
......
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