Commit 6ee374d8 authored by Tiger Watson's avatar Tiger Watson

Merge branch '224457-fix-data-integrity-on-issue_feedback-issue_links' into 'master'

Add migration helper index for Vulnerabilities::Finding table

Closes #234065

See merge request gitlab-org/gitlab!38898
parents 89cc8d2d 9645fc7f
---
title: Add migration helper index for Vulnerabilities::Finding table
merge_request: 38898
author:
type: changed
# frozen_string_literal: true
class AddMigrationIndexToVulnerabilitiesOccurrences < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :vulnerability_occurrences,
"project_id, report_type, encode(project_fingerprint, 'hex'::text)",
name: 'index_vulnerability_occurrences_for_issue_links_migration'
end
def down
remove_concurrent_index_by_name :vulnerability_occurrences,
:index_vulnerability_occurrences_for_issue_links_migration
end
end
5aeb0e74859df14e460b39b9f070624a02278c13b1da9393e1671b4c79635f52
\ No newline at end of file
......@@ -20950,6 +20950,8 @@ CREATE UNIQUE INDEX index_vulnerability_occurrence_identifiers_on_unique_keys ON
CREATE INDEX index_vulnerability_occurrence_pipelines_on_pipeline_id ON public.vulnerability_occurrence_pipelines USING btree (pipeline_id);
CREATE INDEX index_vulnerability_occurrences_for_issue_links_migration ON public.vulnerability_occurrences USING btree (project_id, report_type, encode(project_fingerprint, 'hex'::text));
CREATE INDEX index_vulnerability_occurrences_on_primary_identifier_id ON public.vulnerability_occurrences USING btree (primary_identifier_id);
CREATE INDEX index_vulnerability_occurrences_on_scanner_id ON public.vulnerability_occurrences USING btree (scanner_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