From 83d20e70cb343a3c191b7be8ddc610f3d98265e4 Mon Sep 17 00:00:00 2001 From: mertmit Date: Fri, 17 Feb 2023 10:09:02 +0300 Subject: [PATCH] fix: sql client type calls Signed-off-by: mertmit --- packages/nocodb/src/lib/meta/api/tableApis.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nocodb/src/lib/meta/api/tableApis.ts b/packages/nocodb/src/lib/meta/api/tableApis.ts index 8eb3d6a10e..8e02d5aca8 100644 --- a/packages/nocodb/src/lib/meta/api/tableApis.ts +++ b/packages/nocodb/src/lib/meta/api/tableApis.ts @@ -151,7 +151,7 @@ export async function tableCreate(req: Request, res) { const sqlClient = await NcConnectionMgrv2.getSqlClient(base); let tableNameLengthLimit = 255; - const sqlClientType = sqlClient.clientType; + const sqlClientType = sqlClient.knex.clientType(); if (sqlClientType === 'mysql2' || sqlClientType === 'mysql') { tableNameLengthLimit = 64; } else if (sqlClientType === 'pg') { @@ -298,7 +298,7 @@ export async function tableUpdate(req: Request, res) { const sqlClient = await NcConnectionMgrv2.getSqlClient(base); let tableNameLengthLimit = 255; - const sqlClientType = sqlClient.clientType; + const sqlClientType = sqlClient.knex.clientType(); if (sqlClientType === 'mysql2' || sqlClientType === 'mysql') { tableNameLengthLimit = 64; } else if (sqlClientType === 'pg') {