aboutsummaryrefslogtreecommitdiff
path: root/dbstore/sql/feed
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2022-02-19 17:10:34 -0500
committerPaul Duncan <pabs@pablotron.org>2022-02-19 17:10:34 -0500
commit19cbd7952f8f70cfe030a1a894aaff16af8ec8fe (patch)
treeeed901fe97f7070391982494d5aea7b06c89aaa2 /dbstore/sql/feed
parent0e7e9a471f3f6ea7c2e9873ac8d1397d010c6355 (diff)
downloadcvez-19cbd7952f8f70cfe030a1a894aaff16af8ec8fe.tar.bz2
cvez-19cbd7952f8f70cfe030a1a894aaff16af8ec8fe.zip
dbstore: store cve year and number instead of CVE ID, add and use assigners table
Diffstat (limited to 'dbstore/sql/feed')
-rw-r--r--dbstore/sql/feed/insert-cve.sql5
1 files changed, 4 insertions, 1 deletions
diff --git a/dbstore/sql/feed/insert-cve.sql b/dbstore/sql/feed/insert-cve.sql
index 02c0a8a..9e62048 100644
--- a/dbstore/sql/feed/insert-cve.sql
+++ b/dbstore/sql/feed/insert-cve.sql
@@ -1,2 +1,5 @@
-- add cve
-INSERT INTO cves(item_id, nvd_cve_id, assigner) VALUES (?, ?, ?);
+INSERT INTO cves(item_id, cve_year, cve_num, assigner_id) VALUES (
+ ?, ?, ?,
+ (SELECT assigner_id FROM assigners WHERE assigner = ?)
+);