Browse Source

fix: Convert port to number in connection config

Signed-off-by: Pranav C <61551451+pranavxc@users.noreply.github.com>
pull/431/head
Pranav C 3 years ago
parent
commit
3c65b1a607
  1. 2
      packages/nocodb/docker-compose.yml
  2. 6
      packages/nocodb/src/lib/noco/common/NcConnectionMgr.ts

2
packages/nocodb/docker-compose.yml

@ -139,7 +139,7 @@ services:
# - ./sqlite-sakila-db:/root/db/
# # - ./sqlite-sakila-db:/root/db/
mssql:
image: microsoft/mssql-server-linux:latest
image: mcr.microsoft.com/mssql/server:2019-CU11-ubuntu-20.04
# restart: always
environment:
ACCEPT_EULA: Y

6
packages/nocodb/src/lib/noco/common/NcConnectionMgr.ts

@ -60,7 +60,11 @@ export default class NcConnectionMgr {
}
}
const isSqlite = connectionConfig.client === 'sqlite3';
const isSqlite = connectionConfig?.client === 'sqlite3';
if (connectionConfig?.connection?.port) {
connectionConfig.connection.port = +connectionConfig.connection.port
}
this.connectionRefs[projectId][env][dbAlias] = XKnex(isSqlite ?
connectionConfig.connection as Knex.Config :

Loading…
Cancel
Save