Sql_prepare_internal: sqlite3_prepare failed: no such table: cert.dfn_cert_advs

I upgraded from openvas-9 to gvm-10 (both from mrazavi’s PPA) following the migration instructions on https://launchpad.net/~mrazavi/+archive/ubuntu/gvm (“A note for OpenVAS 9 users”).

Now I’m getting in my gvmd.log:

md manage:MESSAGE:2019-05-05 21h17.31 utc:2975: No CERT database found
md manage:   INFO:2019-05-05 21h17.31 utc:2976: sync_cert: Updating data from feed
md manage:WARNING:2019-05-05 21h17.31 utc:2976: sql_prepare_internal: sqlite3_prepare failed: no such table: cert.dfn_cert_advs
md manage:WARNING:2019-05-05 21h17.31 utc:2976: sql_x_internal: sql_prepare failed

certdata-sync reports:

/usr/sbin/greenbone-certdata-sync --feedversion
/usr/sbin/greenbone-certdata-sync --identify
CERTSYNC|greenbone-certdata-sync|8.0.0|OpenVAS CERT Feed|0|CERTSYNC
/usr/sbin/greenbone-certdata-sync --selftest
echo $?

Can I simpy create that table? How?

I was able to fix this by stopping everything, removing the cert.db file and restarting; afterwards I triggered an update of the cert data and all was well.

I’ve noticed the same today after migrating an GVM-9 installation to GVM-10. It seems two migration steps where missed in the migration guide. While the scap and cert data files are not containing any valuable data (which needs to be kept) and the deletion of these files are a possible workaround the following PR should include the missing migration steps: