Commit f4f45f31 authored by Tan Le's avatar Tan Le

Drop temporary index on audit_events table

This index was created as part of the clean up on serialize object in
details field. The job has completed and all tainted data has been
removed.
parent 8068bdb0
---
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
......@@ -18610,8 +18610,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_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_user_id_and_name ON public.award_emoji USING btree (user_id, name);
......@@ -23650,5 +23648,6 @@ COPY "schema_migrations" (version) FROM STDIN;
20200707071941
20200707094341
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