Commit 985082df authored by Andreas Brandl's avatar Andreas Brandl

Add user index on spam logs

Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/327481
parent d05c4f0d
---
title: Add user index on spam logs
merge_request: 59151
author:
type: performance
# frozen_string_literal: true
class AddUserIndexOnSpamLogs < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
INDEX_NAME = 'index_spam_logs_on_user_id'
def up
add_concurrent_index :spam_logs, :user_id, name: INDEX_NAME
end
def down
remove_concurrent_index_by_name :spam_logs, INDEX_NAME
end
end
4a1435a56b8e5cddd83b844f84374bca91810bbfc5f44faf2a53fd41f93be69c
\ No newline at end of file
......@@ -23943,6 +23943,8 @@ CREATE UNIQUE INDEX index_sop_configs_on_project_id ON security_orchestration_po
CREATE INDEX index_sop_configurations_project_id_policy_project_id ON security_orchestration_policy_configurations USING btree (security_policy_management_project_id, project_id);
CREATE INDEX index_spam_logs_on_user_id ON spam_logs USING btree (user_id);
CREATE INDEX index_sprints_iterations_cadence_id ON sprints USING btree (iterations_cadence_id);
CREATE INDEX index_sprints_on_description_trigram ON sprints USING gin (description gin_trgm_ops);
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