diff --git a/packages/server/src/api/controllers/datasource.ts b/packages/server/src/api/controllers/datasource.ts index 469cd29b56..d212f7f361 100644 --- a/packages/server/src/api/controllers/datasource.ts +++ b/packages/server/src/api/controllers/datasource.ts @@ -14,7 +14,6 @@ import { invalidateDynamicVariables } from "../../threads/utils" import { db as dbCore, context, events } from "@budibase/backend-core" import { UserCtx, Datasource, Row } from "@budibase/types" import sdk from "../../sdk" -import { mergeConfigs } from "../../sdk/app/datasources/datasources" export async function fetch(ctx: UserCtx) { // Get internal tables diff --git a/packages/server/src/integrations/microsoftSqlServer.ts b/packages/server/src/integrations/microsoftSqlServer.ts index 437a9812a6..48cb244b84 100644 --- a/packages/server/src/integrations/microsoftSqlServer.ts +++ b/packages/server/src/integrations/microsoftSqlServer.ts @@ -26,7 +26,7 @@ interface MSSQLConfig { user: string password: string server: string - port: number + port: number | string database: string schema: string encrypt?: boolean @@ -108,6 +108,9 @@ class SqlServerIntegration extends Sql implements DatasourcePlus { constructor(config: MSSQLConfig) { super(SqlClient.MS_SQL) this.config = config + if (typeof this.config?.port === "string") { + this.config.port = parseInt(this.config.port) + } const clientCfg = { ...this.config, options: {