Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed the Business Process Map from gvmd. #1627

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Remove Network Source Interface from gvmd [#1511](https://github.com/greenbone/gvmd/pull/1511)
- Removed OVAL definitions from gvmd [#1525](https://github.com/greenbone/gvmd/pull/1525)
- Removed OVAL definitions from GMP and gvmd documentation [1551](https://github.com/greenbone/gvmd/pull/1551)
- Removed the Business Process Map from gvmd [1627](https://github.com/greenbone/gvmd/pull/1627)

[Unreleased]: https://github.com/greenbone/gvmd/compare/gvmd-21.04...master

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ include (CPack)

## Variables

set (GVMD_DATABASE_VERSION 245)
set (GVMD_DATABASE_VERSION 246)

set (GVMD_SCAP_DATABASE_VERSION 19)

Expand Down
39 changes: 39 additions & 0 deletions src/manage_migrators.c
Original file line number Diff line number Diff line change
Expand Up @@ -2745,6 +2745,44 @@ migrate_244_to_245 ()
return 0;
}

/**
* @brief Migrate the database from version 245 to version 246.
*
* @return 0 success, -1 error.
*/
int
migrate_245_to_246 ()
{
sql_begin_immediate ();

/* Ensure that the database is currently version 245. */

if (manage_db_version () != 245)
{
sql_rollback ();
return -1;
}

/* Update the database. */

/* The support of Business Process Maps has been discontinued. Therefore
* any entry in the settings table where "Business Process Map" data are
* stored can be deleted
*/

/* Delete any setting for "Business Process Maps" . */
sql ("DELETE FROM settings WHERE uuid = '3232d608-e5bb-415e-99aa-019f16eede8d';");
sql ("DELETE FROM settings WHERE uuid = '3ce2d136-bb52-448a-93f0-20069566f877';");

/* Set the database version to 246. */

set_db_version (246);

sql_commit ();

return 0;
}


#undef UPDATE_DASHBOARD_SETTINGS

Expand Down Expand Up @@ -2797,6 +2835,7 @@ static migrator_t database_migrators[] = {
{243, migrate_242_to_243},
{244, migrate_243_to_244},
{245, migrate_244_to_245},
{246, migrate_245_to_246},
/* End marker. */
{-1, NULL}};

Expand Down
10 changes: 0 additions & 10 deletions src/manage_sql.c
Original file line number Diff line number Diff line change
Expand Up @@ -49901,16 +49901,6 @@ modify_setting (const gchar *uuid, const gchar *name,
/* Tickets */
else if (strcmp (uuid, "70b0626f-a835-478e-8194-e09f97887a15") == 0)
setting_name = g_strdup ("Tickets Top Dashboard Configuration");

/* Business Process Model (BPM) */
else if (strcmp (uuid, "3232d608-e5bb-415e-99aa-019f16eede8d") == 0)
setting_name = g_strdup ("BPM Dashboard Configuration");

/*
* Client data for Business Process Modeling (BPM)
*/
else if (strcmp (uuid, "3ce2d136-bb52-448a-93f0-20069566f877") == 0)
setting_name = g_strdup ("BPM Data");
}

if (setting_name)
Expand Down