diff options
Diffstat (limited to 'dbstore')
-rw-r--r-- | dbstore/sql/init.sql | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/dbstore/sql/init.sql b/dbstore/sql/init.sql index 662893e..1e9ec15 100644 --- a/dbstore/sql/init.sql +++ b/dbstore/sql/init.sql @@ -368,7 +368,7 @@ CREATE TABLE cves ( ), -- number of NVD CVE ID, (e.g. the "YYYY" in "CVE-XXXX-YYYY") - cve_num SMALLINT NOT NULL CHECK ( + cve_num INT NOT NULL CHECK ( -- there is no upper bound, but let's pick -- something sane cve_num BETWEEN 1 AND 33554432 @@ -685,7 +685,7 @@ CREATE TRIGGER tr_cve_fts_refresh_before_insert END; -- --- create insert trigger on item_cvss_v3_impacts +-- create insert trigger on cve_fts_refresh -- -- Notes: -- * test sizes: @@ -839,7 +839,7 @@ CREATE TABLE cisa_vulns ( ), -- number of NVD CVE ID, (e.g. the "YYYY" in "CVE-XXXX-YYYY") - cve_num SMALLINT NOT NULL CHECK ( + cve_num INT NOT NULL CHECK ( -- there is no upper bound, but let's pick -- something sane cve_num BETWEEN 1 AND 33554432 @@ -945,17 +945,17 @@ CREATE TRIGGER tr_cisa_vulns_fts_refresh_after_insert description ) SELECT a.vuln_id, -- vuln ID - b.cve_id, -- NVD cve id + b.nvd_id, -- NVD cve id c.name, -- vendor name d.name, -- product name a.name, -- vuln name a.description -- vuln description FROM cisa_vulns a - JOIN cve_vuln_cve_ids b + JOIN cisa_vuln_cve_ids b ON (b.vuln_id = a.vuln_id) JOIN cisa_vendors c ON (c.vendor_id = a.vendor_id) JOIN cisa_products d - ON (c.product_id = a.product_id); + ON (d.product_id = a.product_id); END; |