Commit 36472b0a authored by Andreas Brandl's avatar Andreas Brandl

Merge branch 'introduce_compound_index_for_security_findings_table' into 'master'

Create index on `security_findings`(`scan_id`, `id`)

See merge request gitlab-org/gitlab!84185
parents 49e06ce6 30f8a95b
# frozen_string_literal: true
class CreateScanIdAndIdIndexOnSecurityFindings < Gitlab::Database::Migration[1.0]
INDEX_NAME = 'index_security_findings_on_scan_id_and_id'
disable_ddl_transaction!
def up
add_concurrent_index :security_findings, [:scan_id, :id], name: INDEX_NAME
end
def down
remove_concurrent_index_by_name :security_findings, INDEX_NAME
end
end
1d1682cb14041f14f691fcf880e6446ae464645a5ccbd36687620c3279f53e25
\ No newline at end of file
...@@ -29012,6 +29012,8 @@ CREATE INDEX index_security_findings_on_project_fingerprint ON security_findings ...@@ -29012,6 +29012,8 @@ CREATE INDEX index_security_findings_on_project_fingerprint ON security_findings
CREATE INDEX index_security_findings_on_scan_id_and_deduplicated ON security_findings USING btree (scan_id, deduplicated); CREATE INDEX index_security_findings_on_scan_id_and_deduplicated ON security_findings USING btree (scan_id, deduplicated);
CREATE INDEX index_security_findings_on_scan_id_and_id ON security_findings USING btree (scan_id, id);
CREATE INDEX index_security_findings_on_scanner_id ON security_findings USING btree (scanner_id); CREATE INDEX index_security_findings_on_scanner_id ON security_findings USING btree (scanner_id);
CREATE INDEX index_security_findings_on_severity ON security_findings USING btree (severity); CREATE INDEX index_security_findings_on_severity ON 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