diff --git a/winixd/core/app.cpp b/winixd/core/app.cpp index 909e60c..8727c04 100644 --- a/winixd/core/app.cpp +++ b/winixd/core/app.cpp @@ -316,6 +316,14 @@ bool App::TryToMakeDatabaseMigration() return false; } } + + PluginRes res = plugin.Call(nullptr, WINIX_MAKE_DATABASE_MIGRATION); + + if( config.db_stop_if_migration_fails && res.res_false > 0 ) + { + log << log1 << "App: database migration of some plugins failed, stopping winix" << logend; + return false; + } } return true; diff --git a/winixd/core/pluginmsg.h b/winixd/core/pluginmsg.h index b7218cd..0a9b239 100644 --- a/winixd/core/pluginmsg.h +++ b/winixd/core/pluginmsg.h @@ -5,7 +5,7 @@ */ /* - * Copyright (c) 2008-2015, Tomasz Sowa + * Copyright (c) 2008-2021, Tomasz Sowa * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -40,6 +40,8 @@ namespace Winix { +// IMPROVEME give some description +#define WINIX_MAKE_DATABASE_MIGRATION 997