question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Initial update of empty postgres database does not work with 6.1.3

See original GitHub issue

Describe the bug Central postgres DB initialization does not work with 6.1.3

Version of dependency-check used The problem occurs using version 6.1.3 of the cli

Log file Errors are Caused by: org.owasp.dependencycheck.data.nvdcve.DatabaseException: Database schema is out of date and org.owasp.dependencycheck.data.nvdcve.DatabaseException: Database schema does not match this version of dependency-check

To Reproduce For our central DB we are using a deployment of two instances of a postgres database in kubernetes. A init container downloads the core/src/main/resources/data/initialize_postgres.sql from the tag corresponding to the dependency-check version of the container. After that the postgres DB is initialized with the downloaded file (there is no persistence, the DB is always empty at start). The initial update is done using a sidecar that uses the dependency-check docker container with the version corresponding to the tag.

The initialization works but the update fails with the given error messages.

Expected behavior Initialization and update of an empty postgres DB should work with 6.1.3

Additional context I suspect that there are changes missing in the initialize_postgres.sql file that are present in initialize.sql.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
aikebahcommented, Mar 23, 2021

If @jeremylong doesn’t beat me to it I will create and merge the fix for the ‘external’ database initialisation scripts tonight in order to ensure that the next release will function as expected.

0reactions
jeremylongcommented, Mar 23, 2021

Sorry about that - I forgot to update the external database scripts… They have been updated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to create database in PostreSQL using Npgsql and ...
You can create your database first, and then connect to it. Update (2016): Npgsql 3 now implements database creation code-first. Make sure you...
Read more >
Getting Started with PostgreSQL
I assume that you are familiar with SQL commands (such as CREATE TABLE, DROP TABLE, INSERT, SELECT, UPDATE and DELETE). Otherwise, read ....
Read more >
Using pg upgrade on Ubuntu/Debian - PostgreSQL wiki
First you need to stop the relevant database clusters. To stop all clusters, run: sudo /etc/init.d/postgresql stop. (If you don't want to ...
Read more >
38.17. Packaging Related Objects into an Extension
PostgreSQL does not currently support extension scripts issuing CREATE POLICY or ... function compared to 1.0, the extension author can provide an update...
Read more >
41.4. Rules on INSERT, UPDATE, and DELETE - PostgreSQL
For update rules, the rule system creates a list of query trees. Initially the query-tree list is empty. There can be zero (...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found