Commit bc2e3428 authored by Yannis Roussos's avatar Yannis Roussos Committed by Andreas Brandl

Add index on web_hook_id to partitioned web_hook_logs

parent 20288722
---
title: Add index on web_hook_id to partitioned web_hook_logs
merge_request: 59266
author:
type: other
# frozen_string_literal: true
class AddIndexOnWebHookIdToPartitionedWebHookLog < ActiveRecord::Migration[6.0]
include Gitlab::Database::PartitioningMigrationHelpers
DOWNTIME = false
WEB_HOOK_ID_INDEX_NAME = 'index_web_hook_logs_part_on_web_hook_id'
disable_ddl_transaction!
def up
add_concurrent_partitioned_index :web_hook_logs_part_0c5294f417,
:web_hook_id,
name: WEB_HOOK_ID_INDEX_NAME
end
def down
remove_concurrent_partitioned_index_by_name :web_hook_logs_part_0c5294f417, WEB_HOOK_ID_INDEX_NAME
end
end
d166250305c2939bea8cc1970faf50d86776d32270a80a429cce668a97280aad
\ No newline at end of file
...@@ -24258,6 +24258,8 @@ CREATE INDEX index_web_hook_logs_on_created_at_and_web_hook_id ON web_hook_logs ...@@ -24258,6 +24258,8 @@ CREATE INDEX index_web_hook_logs_on_created_at_and_web_hook_id ON web_hook_logs
CREATE INDEX index_web_hook_logs_on_web_hook_id ON web_hook_logs USING btree (web_hook_id); CREATE INDEX index_web_hook_logs_on_web_hook_id ON web_hook_logs USING btree (web_hook_id);
CREATE INDEX index_web_hook_logs_part_on_web_hook_id ON ONLY web_hook_logs_part_0c5294f417 USING btree (web_hook_id);
CREATE INDEX index_web_hooks_on_group_id ON web_hooks USING btree (group_id) WHERE ((type)::text = 'GroupHook'::text); CREATE INDEX index_web_hooks_on_group_id ON web_hooks USING btree (group_id) WHERE ((type)::text = 'GroupHook'::text);
CREATE INDEX index_web_hooks_on_project_id ON web_hooks USING btree (project_id); CREATE INDEX index_web_hooks_on_project_id ON web_hooks USING btree (project_id);
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