Commit 4596819a authored by Mehmet Emin INAC's avatar Mehmet Emin INAC

Add index to security_findings on scan_id and deduplicated

parent 14ca0064
# frozen_string_literal: true
class AddIndexOnDeduplicatedColumnOfSecurityFindings < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
INDEX_NAME = 'index_security_findings_on_scan_id_and_deduplicated'
disable_ddl_transaction!
def up
add_concurrent_index :security_findings, [:scan_id, :deduplicated], name: INDEX_NAME
end
def down
remove_concurrent_index_by_name :security_findings, INDEX_NAME
end
end
570a7de82da3dabfd12f3099cdc028128d4b61a4ecf6edd4b3102031d914316c
\ No newline at end of file
......@@ -20960,6 +20960,8 @@ CREATE INDEX index_security_findings_on_project_fingerprint ON public.security_f
CREATE INDEX index_security_findings_on_scan_id ON public.security_findings USING btree (scan_id);
CREATE INDEX index_security_findings_on_scan_id_and_deduplicated ON public.security_findings USING btree (scan_id, deduplicated);
CREATE INDEX index_security_findings_on_scanner_id ON public.security_findings USING btree (scanner_id);
CREATE INDEX index_security_findings_on_severity ON public.security_findings USING btree (severity);
......
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