From 1d3eee6b166db5f8e85618290ca1aba1af12448b Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 1 May 2023 11:52:42 +0530 Subject: [PATCH 1/2] fix: create meta db if missing Signed-off-by: Pranav C --- packages/nocodb-nest/src/app.module.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/nocodb-nest/src/app.module.ts b/packages/nocodb-nest/src/app.module.ts index 8bcb1806f8..bb84e054f4 100644 --- a/packages/nocodb-nest/src/app.module.ts +++ b/packages/nocodb-nest/src/app.module.ts @@ -16,6 +16,7 @@ import { GlobalModule } from './modules/global/global.module'; import { LocalStrategy } from './strategies/local.strategy'; import { AuthTokenStrategy } from './strategies/authtoken.strategy/authtoken.strategy'; import { BaseViewStrategy } from './strategies/base-view.strategy/base-view.strategy'; +import NcConfigFactory from './utils/NcConfigFactory' import NcUpgrader from './version-upgrader/NcUpgrader'; import { MetasModule } from './modules/metas/metas.module'; import NocoCache from './cache/NocoCache'; @@ -68,6 +69,9 @@ export class AppModule implements OnApplicationBootstrap { await NocoCache.init(); await this.connection.init(); + + await NcConfigFactory.metaDbCreateIfNotExist(Noco.config); + await this.metaService.init(); // todo: remove From 970cd3da983f2294e4cfcbd38b0df1a8d8af06f2 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 1 May 2023 12:07:40 +0530 Subject: [PATCH 2/2] fix: pass proper meta config Signed-off-by: Pranav C --- packages/nocodb-nest/src/app.module.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nocodb-nest/src/app.module.ts b/packages/nocodb-nest/src/app.module.ts index bb84e054f4..1307931d5d 100644 --- a/packages/nocodb-nest/src/app.module.ts +++ b/packages/nocodb-nest/src/app.module.ts @@ -70,7 +70,7 @@ export class AppModule implements OnApplicationBootstrap { await this.connection.init(); - await NcConfigFactory.metaDbCreateIfNotExist(Noco.config); + await NcConfigFactory.metaDbCreateIfNotExist(this.connection.config); await this.metaService.init();