diff --git a/make/migrations/postgresql/0120_2.9.0_schema.up.sql b/make/migrations/postgresql/0120_2.9.0_schema.up.sql index 571f9850b4d..a44d26fdf33 100644 --- a/make/migrations/postgresql/0120_2.9.0_schema.up.sql +++ b/make/migrations/postgresql/0120_2.9.0_schema.up.sql @@ -12,6 +12,10 @@ SET cvss_score_v3 = (vendor_attributes->'CVSS'->'nvd'->>'V3Score')::double preci WHERE jsonb_path_exists(vendor_attributes::jsonb, '$.CVSS.nvd.V3Score'); CREATE INDEX IF NOT EXISTS idx_vulnerability_record_cvss_score_v3 ON vulnerability_record (cvss_score_v3); +CREATE INDEX IF NOT EXISTS idx_vulnerability_registration_uuid ON vulnerability_record (registration_uuid); +CREATE INDEX IF NOT EXISTS idx_vulnerability_record_cve_id ON vulnerability_record (cve_id); +CREATE INDEX IF NOT EXISTS idx_vulnerability_record_severity ON vulnerability_record (severity); +CREATE INDEX IF NOT EXISTS idx_vulnerability_record_package ON vulnerability_record (package); /* add summary information in scan_report */ ALTER TABLE scan_report ADD COLUMN IF NOT EXISTS critical_cnt BIGINT;