Commit 1ca17f9b authored by Tiger Watson's avatar Tiger Watson

Merge branch '351281-remove-index' into 'master'

Remove unique index from `vulnerability_occurrences` table

See merge request gitlab-org/gitlab!79683
parents cec7f660 cf37d972
# frozen_string_literal: true
class RemoveIndexForVulnerabilityOccurrences < Gitlab::Database::Migration[1.0]
INDEX_NAME = 'index_vulnerability_occurrences_on_unique_keys'
disable_ddl_transaction!
def up
remove_concurrent_index_by_name :vulnerability_occurrences, INDEX_NAME
end
def down
# no-op
# The index is UNIQUE so we cannot add it back again
end
end
79a636f33f70327206356abd1793b73a5ef5e920a41662e35cbff5597b03a365
\ No newline at end of file
......@@ -28179,8 +28179,6 @@ CREATE INDEX index_vulnerability_occurrences_on_project_fingerprint ON vulnerabi
CREATE INDEX index_vulnerability_occurrences_on_scanner_id ON vulnerability_occurrences USING btree (scanner_id);
CREATE UNIQUE INDEX index_vulnerability_occurrences_on_unique_keys ON vulnerability_occurrences USING btree (project_id, primary_identifier_id, location_fingerprint, scanner_id);
CREATE UNIQUE INDEX index_vulnerability_occurrences_on_uuid ON vulnerability_occurrences USING btree (uuid);
CREATE INDEX index_vulnerability_occurrences_on_vulnerability_id ON vulnerability_occurrences USING btree (vulnerability_id);
......@@ -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('be0977fb3642f60c0c04b2197fe55d109d27f9630a011f9a64fd31b9716a7c7f').reference('https://gitlab.com/gitlab-org/gitlab/-/issues/349315') }
it { is_expected.to have_locked_schema('f17b760f30a3ad4e9c7a0d8580161649e7f3c9fd2b4a7e566884be41112468fe').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