Browse Source

fix: sql client type calls

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/5134/head
mertmit 2 years ago
parent
commit
83d20e70cb
  1. 4
      packages/nocodb/src/lib/meta/api/tableApis.ts

4
packages/nocodb/src/lib/meta/api/tableApis.ts

@ -151,7 +151,7 @@ export async function tableCreate(req: Request<any, any, TableReqType>, 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<any, any>, 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') {

Loading…
Cancel
Save