|
|
@ -151,7 +151,7 @@ export async function tableCreate(req: Request<any, any, TableReqType>, res) { |
|
|
|
const sqlClient = await NcConnectionMgrv2.getSqlClient(base); |
|
|
|
const sqlClient = await NcConnectionMgrv2.getSqlClient(base); |
|
|
|
|
|
|
|
|
|
|
|
let tableNameLengthLimit = 255; |
|
|
|
let tableNameLengthLimit = 255; |
|
|
|
const sqlClientType = sqlClient.clientType; |
|
|
|
const sqlClientType = sqlClient.knex.clientType(); |
|
|
|
if (sqlClientType === 'mysql2' || sqlClientType === 'mysql') { |
|
|
|
if (sqlClientType === 'mysql2' || sqlClientType === 'mysql') { |
|
|
|
tableNameLengthLimit = 64; |
|
|
|
tableNameLengthLimit = 64; |
|
|
|
} else if (sqlClientType === 'pg') { |
|
|
|
} else if (sqlClientType === 'pg') { |
|
|
@ -298,7 +298,7 @@ export async function tableUpdate(req: Request<any, any>, res) { |
|
|
|
const sqlClient = await NcConnectionMgrv2.getSqlClient(base); |
|
|
|
const sqlClient = await NcConnectionMgrv2.getSqlClient(base); |
|
|
|
|
|
|
|
|
|
|
|
let tableNameLengthLimit = 255; |
|
|
|
let tableNameLengthLimit = 255; |
|
|
|
const sqlClientType = sqlClient.clientType; |
|
|
|
const sqlClientType = sqlClient.knex.clientType(); |
|
|
|
if (sqlClientType === 'mysql2' || sqlClientType === 'mysql') { |
|
|
|
if (sqlClientType === 'mysql2' || sqlClientType === 'mysql') { |
|
|
|
tableNameLengthLimit = 64; |
|
|
|
tableNameLengthLimit = 64; |
|
|
|
} else if (sqlClientType === 'pg') { |
|
|
|
} else if (sqlClientType === 'pg') { |
|
|
|