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