aboutsummaryrefslogtreecommitdiff
path: root/dbstore/sql/init.sql
diff options
context:
space:
mode:
Diffstat (limited to 'dbstore/sql/init.sql')
-rw-r--r--dbstore/sql/init.sql6
1 files changed, 3 insertions, 3 deletions
diff --git a/dbstore/sql/init.sql b/dbstore/sql/init.sql
index d38ca37..a54f278 100644
--- a/dbstore/sql/init.sql
+++ b/dbstore/sql/init.sql
@@ -387,7 +387,7 @@ CREATE INDEX in_cves_item_id ON cves(item_id);
--
CREATE VIEW cve_nvd_ids AS
SELECT cve_id,
- 'CVE-' || a.cve_year || '-' || printf('%04d', a.cve_num) AS nvd_cve_id
+ printf('CVE-%04-%04d', cve_year, cve_num) AS nvd_id
FROM cves;
--
@@ -1225,7 +1225,7 @@ CREATE TRIGGER tr_cve_fts_refresh_after_insert
h.cve_ref_id, -- cve_ref_id
j.v2_severity_id, -- v2_severity_id
l.v3_severity_id, -- v3_severity_id
- n.nvd_cve_id, -- nvd_cve_id
+ n.nvd_id AS nvd_cve_id, -- nvd_cve_id
b.assigner, -- assigner
COALESCE(d.value, ''), -- cve_desc
COALESCE(g.value, ''), -- pt_desc
@@ -1261,6 +1261,6 @@ CREATE TRIGGER tr_cve_fts_refresh_after_insert
ON (l.item_id = a.item_id)
LEFT JOIN severities m
ON (m.severity_id = l.v3_severity_id)
- JOIN nvd_cve_ids n
+ JOIN cve_nvd_ids n
ON (n.cve_id = a.cve_id);
END;