From 8fac96dd69bc66d97054dc7e46d46178c60edbfd Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Wed, 3 Feb 2021 08:20:21 +0000 Subject: [PATCH] fixes for mySQL and MSSQL non default ports --- .../server/src/integrations/microsoftSqlServer.js | 5 +++++ packages/server/src/integrations/mysql.js | 14 ++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/packages/server/src/integrations/microsoftSqlServer.js b/packages/server/src/integrations/microsoftSqlServer.js index b7713cf15b..c99f4ed39f 100644 --- a/packages/server/src/integrations/microsoftSqlServer.js +++ b/packages/server/src/integrations/microsoftSqlServer.js @@ -17,6 +17,11 @@ const SCHEMA = { type: FIELD_TYPES.STRING, default: "localhost", }, + port: { + type: FIELD_TYPES.NUMBER, + required: false, + default: 1433, + }, database: { type: FIELD_TYPES.STRING, default: "root", diff --git a/packages/server/src/integrations/mysql.js b/packages/server/src/integrations/mysql.js index f5ea1caaca..a6e6ce7afc 100644 --- a/packages/server/src/integrations/mysql.js +++ b/packages/server/src/integrations/mysql.js @@ -1,25 +1,31 @@ const mysql = require("mysql") +const { FIELD_TYPES } = require("./Integration") const SCHEMA = { docs: "https://github.com/mysqljs/mysql", datasource: { host: { - type: "string", + type: FIELD_TYPES.STRING, default: "localhost", required: true, }, + port: { + type: FIELD_TYPES.NUMBER, + default: 1433, + required: false, + }, user: { - type: "string", + type: FIELD_TYPES.STRING, default: "root", required: true, }, password: { - type: "password", + type: FIELD_TYPES.PASSWORD, default: "root", required: true, }, database: { - type: "string", + type: FIELD_TYPES.STRING, required: true, }, },