diff --git a/database/schema/upgrade_scripts/132-add-vulnerable_package_cve-index.sql b/database/schema/upgrade_scripts/132-add-vulnerable_package_cve-index.sql new file mode 100644 index 000000000..f0a70efec --- /dev/null +++ b/database/schema/upgrade_scripts/132-add-vulnerable_package_cve-index.sql @@ -0,0 +1 @@ +CREATE INDEX ON vulnerable_package_cve(cve_id); diff --git a/database/schema/ve_db_postgresql.sql b/database/schema/ve_db_postgresql.sql index 9a41b2250..20062169c 100644 --- a/database/schema/ve_db_postgresql.sql +++ b/database/schema/ve_db_postgresql.sql @@ -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); @@ -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