From e80e0a490ec50cebe00a51912192c347328d89ab Mon Sep 17 00:00:00 2001 From: Pranav C <61551451+pranavxc@users.noreply.github.com> Date: Sun, 11 Jul 2021 23:17:35 +0530 Subject: [PATCH] fix(api): App upgrade - ignore virtual views Signed-off-by: Pranav C <61551451+pranavxc@users.noreply.github.com> --- packages/nocodb/src/lib/noco/Noco.ts | 2 ++ packages/nocodb/src/lib/noco/common/BaseApiBuilder.ts | 5 ++++- packages/nocodb/src/lib/noco/gql/GqlApiBuilder.ts | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/nocodb/src/lib/noco/Noco.ts b/packages/nocodb/src/lib/noco/Noco.ts index 05deb182eb..cc34f2f69e 100644 --- a/packages/nocodb/src/lib/noco/Noco.ts +++ b/packages/nocodb/src/lib/noco/Noco.ts @@ -88,6 +88,8 @@ export default class Noco { constructor() { process.env.PORT = process.env.PORT || '8080'; + // todo: move + process.env.NC_VERSION = '0009044'; this.router = express.Router(); this.projectRouter = express.Router(); diff --git a/packages/nocodb/src/lib/noco/common/BaseApiBuilder.ts b/packages/nocodb/src/lib/noco/common/BaseApiBuilder.ts index 185450de20..4ff6ca5b89 100644 --- a/packages/nocodb/src/lib/noco/common/BaseApiBuilder.ts +++ b/packages/nocodb/src/lib/noco/common/BaseApiBuilder.ts @@ -1325,7 +1325,10 @@ export default abstract class BaseApiBuilder implements XcDynami protected async ncUpManyToMany(): Promise { const models = await this.xcMeta.metaList(this.projectId, this.dbAlias, 'nc_models', { - fields: ['meta'] + fields: ['meta'], + condition: { + type: 'table' + } }); if (!models.length) { return diff --git a/packages/nocodb/src/lib/noco/gql/GqlApiBuilder.ts b/packages/nocodb/src/lib/noco/gql/GqlApiBuilder.ts index e06b521dd1..f444098a8d 100644 --- a/packages/nocodb/src/lib/noco/gql/GqlApiBuilder.ts +++ b/packages/nocodb/src/lib/noco/gql/GqlApiBuilder.ts @@ -1911,7 +1911,8 @@ export class GqlApiBuilder extends BaseApiBuilder implements XcMetaMgr { await this.xcMeta.metaUpdate(this.projectId, this.dbAlias, 'nc_models', { schema }, { - title: meta.tn + title: meta.tn, + type: 'table' }) // todo : add loaders