diff --git a/CHANGELOG.md b/CHANGELOG.md index 40f306ffc..500b24707 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -97,6 +97,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Add user limits on hosts and ifaces to OSP prefs [#1033](https://github.com/greenbone/gvmd/pull/1033) - Fix order of tar options in gvm-lsc-deb-creator.sh [#1034](https://github.com/greenbone/gvmd/pull/1034) - Fix handling of termination signals [#1034](https://github.com/greenbone/gvmd/pull/1034) +- Remove db init warning that no longer makes sense [#1044](https://github.com/greenbone/gvmd/pull/1044) ### Removed - Remove support for "All SecInfo": removal of "allinfo" for type in get_info [#790](https://github.com/greenbone/gvmd/pull/790) diff --git a/src/manage_sql.c b/src/manage_sql.c index 6691b4865..4a14e460e 100644 --- a/src/manage_sql.c +++ b/src/manage_sql.c @@ -15805,7 +15805,6 @@ check_db_versions () { char *database_version; int scap_db_version, cert_db_version; - long long int count; database_version = sql_string ("SELECT value FROM %s.meta" " WHERE name = 'database_version';", @@ -15826,24 +15825,7 @@ check_db_versions () return -2; } g_free (database_version); - - /* Check that the database was initialised from the scanner. - * - * This can also fail after a migration, for example if the database - * was created before NVT preferences were cached in the database. - */ - - if (sql_int64 (&count, - "SELECT count(*) FROM %s.meta" - " WHERE name = 'nvts_feed_version'" - " OR name = 'nvt_preferences_enabled';", - sql_schema ()) - || count < 2) - g_warning ("database must be initialised from scanner"); } - else - /* Assume database is missing. */ - g_warning ("database must be initialised from scanner"); /* Check SCAP database version. */ diff --git a/src/manage_sql_configs.c b/src/manage_sql_configs.c index b77155a6b..28eb80963 100644 --- a/src/manage_sql_configs.c +++ b/src/manage_sql_configs.c @@ -1604,19 +1604,6 @@ manage_nvt_preference_add (const char* name, const char* value) g_free (quoted_value); } -/** - * @brief Enable the NVT preferences. - */ -void -manage_nvt_preferences_enable () -{ - sql ("DELETE FROM %s.meta WHERE name = 'nvt_preferences_enabled';", - sql_schema ()); - sql ("INSERT INTO %s.meta (name, value)" - " VALUES ('nvt_preferences_enabled', 1);", - sql_schema ()); -} - /** * @brief Initialise an NVT preference iterator. *