Commit 9092e4e5 authored by Adam Hegyi's avatar Adam Hegyi

Merge branch '294259-follow-up-from-remove-duplicates-from-vulnerability_occurrences' into 'master'

Remove temporary index from vulnerability_occurrences

See merge request gitlab-org/gitlab!52120
parents 104956b9 f09b6071
# frozen_string_literal: true
class RemoveTemporaryVulnerabilityOccurrencesDeduplicationIndex < Gitlab::Database::Migration[1.0]
MIGRATION = 'RecalculateVulnerabilitiesOccurrencesUuid'
INDEX_NAME = 'tmp_idx_deduplicate_vulnerability_occurrences'
disable_ddl_transaction!
def up
finalize_background_migration(MIGRATION)
remove_concurrent_index_by_name(:vulnerability_occurrences, INDEX_NAME)
end
def down
add_concurrent_index :vulnerability_occurrences,
%i[project_id report_type location_fingerprint primary_identifier_id id],
name: INDEX_NAME
end
end
a488fecd8e6e99b8d32ac27f72c6a3575b0ed29baaf242133e5d1abbd5b64314
\ No newline at end of file
......@@ -28352,8 +28352,6 @@ CREATE UNIQUE INDEX term_agreements_unique_index ON term_agreements USING btree
CREATE INDEX tmp_gitlab_subscriptions_max_seats_used_migration ON gitlab_subscriptions USING btree (id) WHERE ((start_date >= '2021-08-02'::date) AND (start_date <= '2021-11-20'::date) AND (max_seats_used <> 0) AND (max_seats_used > seats_in_use) AND (max_seats_used > seats));
CREATE INDEX tmp_idx_deduplicate_vulnerability_occurrences ON vulnerability_occurrences USING btree (project_id, report_type, location_fingerprint, primary_identifier_id, id);
CREATE INDEX tmp_idx_vulnerability_occurrences_on_id_where_report_type_7_99 ON vulnerability_occurrences USING btree (id) WHERE (report_type = ANY (ARRAY[7, 99]));
CREATE INDEX tmp_index_container_repositories_on_id_migration_state ON container_repositories USING btree (id, migration_state);
......@@ -7,7 +7,7 @@ RSpec.describe Vulnerabilities::Finding do
it { is_expected.to define_enum_for(:severity) }
it { is_expected.to define_enum_for(:detection_method) }
it { is_expected.to have_locked_schema('f17b760f30a3ad4e9c7a0d8580161649e7f3c9fd2b4a7e566884be41112468fe').reference('https://gitlab.com/gitlab-org/gitlab/-/issues/349315') }
it { is_expected.to have_locked_schema('9365b96bf5968b685f28c7c41659aa384e7d0c019cfeb244f22bb6d4bb49cdd7').reference('https://gitlab.com/gitlab-org/gitlab/-/issues/349315') }
where(vulnerability_finding_signatures: [true, false])
with_them do
......
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