Commit d4f517bf authored by Andreas Brandl's avatar Andreas Brandl

Merge branch '220124-remove-temporary-indexes-on-serialized-objects-cleanup' into 'master'

Remove temporary indexes on serialized objects cleanup

See merge request gitlab-org/gitlab!36547
parents 8e5366c1 f4f45f31
---
title: Drop index of ruby objects in details on audit_events table
merge_request: 36547
author:
type: other
# frozen_string_literal: true
class DropIndexRubyObjectsInDetailsOnAuditEvents < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
INDEX_NAME = 'index_audit_events_on_ruby_object_in_details'
disable_ddl_transaction!
def up
remove_concurrent_index_by_name(:audit_events, INDEX_NAME)
end
def down
add_concurrent_index(:audit_events, :id, where: "details ~~ '%ruby/object%'", name: INDEX_NAME)
end
end
...@@ -18609,8 +18609,6 @@ CREATE INDEX index_approvers_on_user_id ON public.approvers USING btree (user_id ...@@ -18609,8 +18609,6 @@ 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_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); CREATE INDEX index_award_emoji_on_awardable_type_and_awardable_id ON public.award_emoji USING btree (awardable_type, awardable_id);
CREATE INDEX index_award_emoji_on_user_id_and_name ON public.award_emoji USING btree (user_id, name); CREATE INDEX index_award_emoji_on_user_id_and_name ON public.award_emoji USING btree (user_id, name);
...@@ -23646,5 +23644,6 @@ COPY "schema_migrations" (version) FROM STDIN; ...@@ -23646,5 +23644,6 @@ COPY "schema_migrations" (version) FROM STDIN;
20200707071941 20200707071941
20200707094341 20200707094341
20200707095849 20200707095849
20200710102846
\. \.
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