diff --git a/native/cpp/CommonCpp/DatabaseManagers/DatabaseManager.h b/native/cpp/CommonCpp/DatabaseManagers/DatabaseManager.h --- a/native/cpp/CommonCpp/DatabaseManagers/DatabaseManager.h +++ b/native/cpp/CommonCpp/DatabaseManagers/DatabaseManager.h @@ -10,6 +10,7 @@ public: static const DatabaseQueryExecutor &getQueryExecutor(); static void initializeQueryExecutor(); + static void setDatabaseStatusAsWorkable(); }; } // namespace comm diff --git a/native/cpp/CommonCpp/DatabaseManagers/DatabaseManager.cpp b/native/cpp/CommonCpp/DatabaseManagers/DatabaseManager.cpp --- a/native/cpp/CommonCpp/DatabaseManagers/DatabaseManager.cpp +++ b/native/cpp/CommonCpp/DatabaseManagers/DatabaseManager.cpp @@ -56,4 +56,9 @@ } } +void DatabaseManager::setDatabaseStatusAsWorkable() { + comm::CommSecureStore commSecureStore{}; + commSecureStore.set(DATABASE_MANAGER_STATUS_KEY, DB_MANAGER_WORKABLE); +} + } // namespace comm diff --git a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp --- a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp +++ b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp @@ -1,5 +1,6 @@ #include "SQLiteQueryExecutor.h" #include "CommSecureStore.h" +#include "DatabaseManager.h" #include "Logger.h" #include "sqlite_orm.h" @@ -715,6 +716,7 @@ Logger::log("Database structure created."); sqlite3_close(db); + DatabaseManager::setDatabaseStatusAsWorkable(); return; } @@ -746,6 +748,7 @@ } sqlite3_close(db); + DatabaseManager::setDatabaseStatusAsWorkable(); } void SQLiteQueryExecutor::assign_encryption_key() {