Skip to content

Commit

Permalink
fix(database): vulnerable_package_cve(cve) index is useful for cve/af…
Browse files Browse the repository at this point in the history
…fected_systems query
  • Loading branch information
jdobes committed Apr 18, 2024
1 parent 3ef3717 commit 98206e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE INDEX ON vulnerable_package_cve(cve_id);
4 changes: 3 additions & 1 deletion database/schema/ve_db_postgresql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ CREATE TABLE IF NOT EXISTS db_version (
) TABLESPACE pg_default;

-- set the schema version directly in the insert statement here!!
INSERT INTO db_version (name, version) VALUES ('schema_version', 131);
INSERT INTO db_version (name, version) VALUES ('schema_version', 132);
-- INSERT INTO db_version (name, version) VALUES ('schema_version', :schema_version);


Expand Down Expand Up @@ -687,6 +687,8 @@ CREATE TABLE IF NOT EXISTS vulnerable_package_cve (
REFERENCES cve_metadata (id)
) TABLESPACE pg_default;

CREATE INDEX ON vulnerable_package_cve(cve_id);

GRANT SELECT, INSERT, UPDATE, DELETE ON vulnerable_package_cve TO ve_db_user_evaluator;

-- system vulnerable package table
Expand Down

0 comments on commit 98206e5

Please sign in to comment.