Skip to content

Commit

Permalink
Merge pull request #1627 from jhelmold/remove_business_process_map
Browse files Browse the repository at this point in the history
Removed the Business Process Map from gvmd.
  • Loading branch information
timopollmeier authored Jul 9, 2021
2 parents 00ea3ff + 4935908 commit c93e1df
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 11 deletions.
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

0 comments on commit c93e1df

Please sign in to comment.