added WINIX_MAKE_DATABASE_MIGRATION plugin message for making migrations from plugins

This commit is contained in:
Tomasz Sowa 2021-08-11 22:18:14 +02:00
parent ef22d951a0
commit 42dc43b036
2 changed files with 11 additions and 1 deletions

View File

@ -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;

View File

@ -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