Cause: while refactoring doc.js in V1.0.0, one of the variables was global, which meant it pointed to the last document collection. Thats where all the document change histories went instead of the corresponding collection.
Cherry-picked from 5994b27ad4811d28c0aa5a4800842b3d93b7bad6 and fixed conflicts.
Verified in the database that:
cve_histories does not contain entries that belong in cve5_histories
nvd_histories contains entries for 4 CVE's that belong in cve_histories
all other entries in nvd_histories belong in cve5_histories
Tested locally that this PR makes CVE5 histories disappear, and then reappear when I copy the entries from nvd_histories to cve5_histories.
I propose we treat this migration as follows:
Review and merge this PR
Deploy to vulnogram test environment
Test that there are no obvious problems (other than that the CVE5 histories disappear)
If not, deploy to production, and immediately manually (with mongosh) copy the history lines for the 4 CVE's to cve_histories, and the rest to cve5_histories
Cause: while refactoring doc.js in V1.0.0, one of the variables was global, which meant it pointed to the last document collection. Thats where all the document change histories went instead of the corresponding collection.
Cherry-picked from 5994b27ad4811d28c0aa5a4800842b3d93b7bad6 and fixed conflicts.
Verified in the database that:
Tested locally that this PR makes CVE5 histories disappear, and then reappear when I copy the entries from nvd_histories to cve5_histories.
I propose we treat this migration as follows:
Fixes #35