From 10ff2351a67bf78f441e2cf2fae024775142fe5c Mon Sep 17 00:00:00 2001 From: Yaron Dayagi Date: Mon, 22 Jan 2024 09:32:10 +0200 Subject: [PATCH] fix(notifications): create DB upon startup (#1096) FLPATH-875 https://issues.redhat.com/browse/FLPATH-875 Signed-off-by: Yaron Dayagi --- plugins/notifications-backend/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/notifications-backend/README.md b/plugins/notifications-backend/README.md index 172dc9ca69..19642fc9d6 100644 --- a/plugins/notifications-backend/README.md +++ b/plugins/notifications-backend/README.md @@ -80,6 +80,10 @@ import { PluginEnvironment } from '../types'; export default async function createPlugin( env: PluginEnvironment, ): Promise { + // workaround for creating the database when client is not sqlite + const dbClient = await env.database.getClient() + dbClient.destroy() + const catalogClient = new CatalogClient({ discoveryApi: env.discovery }); const dbConfig = env.config.getConfig('backend.database'); // Following is optional