Skip to content
Snippets Groups Projects
Commit 9e40dda5 authored by euko's avatar euko :palm_tree: Committed by euko
Browse files

Create temporary index for system_note_metadata

This is the sync counterpart to the async index
creation.

See !119020

Changelog: other
parent b53ca218
No related branches found
No related tags found
1 merge request!119019Synchronously create 'tmp_index_for_backfilling_resource_link_events'
# frozen_string_literal: true
class IndexSystemNoteMetadataOnIdForRelateAndUnrelateActions < Gitlab::Database::Migration[2.1]
INDEX_NAME = 'tmp_index_for_backfilling_resource_link_events'
CONDITION = "action='relate_to_parent' OR action='unrelate_from_parent'"
disable_ddl_transaction!
def up
# Temporary index to be removed in https://gitlab.com/gitlab-org/gitlab/-/issues/408797
add_concurrent_index :system_note_metadata, :id,
where: CONDITION,
name: INDEX_NAME
end
def down
remove_concurrent_index_by_name :system_note_metadata, INDEX_NAME
end
end
54267e34c6978456efca6c784c4e4ea7541dac98a704095a9766809725021bb8
\ No newline at end of file
......@@ -33164,6 +33164,8 @@ CREATE INDEX tmp_index_container_repos_on_non_migrated ON container_repositories
 
CREATE INDEX tmp_index_container_repositories_on_id_migration_state ON container_repositories USING btree (id, migration_state);
 
CREATE INDEX tmp_index_for_backfilling_resource_link_events ON system_note_metadata USING btree (id) WHERE (((action)::text = 'relate_to_parent'::text) OR ((action)::text = 'unrelate_from_parent'::text));
CREATE INDEX tmp_index_for_null_member_namespace_id ON members USING btree (member_namespace_id) WHERE (member_namespace_id IS NULL);
 
CREATE INDEX tmp_index_for_project_namespace_id_migration_on_routes ON routes USING btree (id) WHERE ((namespace_id IS NULL) AND ((source_type)::text = 'Project'::text));
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment