From 947da97d62113a5a53e2443e060ff86d61e5d3bb Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 12 Apr 2021 15:01:52 +0100 Subject: [PATCH 1/6] Update microsoftSqlServer.js --- .../src/integrations/microsoftSqlServer.js | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/packages/server/src/integrations/microsoftSqlServer.js b/packages/server/src/integrations/microsoftSqlServer.js index eea67a7256..ea26b6a2a7 100644 --- a/packages/server/src/integrations/microsoftSqlServer.js +++ b/packages/server/src/integrations/microsoftSqlServer.js @@ -37,6 +37,12 @@ const SCHEMA = { read: { type: "sql", }, + update: { + type: "sql", + }, + delete: { + type: "sql", + }, }, } @@ -71,6 +77,28 @@ class SqlServerIntegration { throw err } } + + async update(query) { + try { + await this.connect() + const response = await this.client.query(query.sql) + return response.recordset + } catch (err) { + console.error("Error querying MS SQL Server", err) + throw err + } + } + + async delete(query) { + try { + await this.connect() + const response = await this.client.query(query.sql) + return response.recordset + } catch (err) { + console.error("Error querying MS SQL Server", err) + throw err + } + } } module.exports = { From f5c31f73b31ddd13b488e5b30ddf3a100180877b Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 12 Apr 2021 16:51:07 +0100 Subject: [PATCH 2/6] lint --- packages/server/src/integrations/microsoftSqlServer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/src/integrations/microsoftSqlServer.js b/packages/server/src/integrations/microsoftSqlServer.js index ea26b6a2a7..9c12c4b8f4 100644 --- a/packages/server/src/integrations/microsoftSqlServer.js +++ b/packages/server/src/integrations/microsoftSqlServer.js @@ -77,8 +77,8 @@ class SqlServerIntegration { throw err } } - - async update(query) { + + async update(query) { try { await this.connect() const response = await this.client.query(query.sql) From fe5dd7e2ac795bd9d1453657d703a2bbcc8475c3 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 12 Apr 2021 17:10:19 +0100 Subject: [PATCH 3/6] v0.8.15 --- lerna.json | 2 +- packages/builder/package.json | 6 +++--- packages/cli/package.json | 2 +- packages/client/package.json | 6 +++--- packages/server/package.json | 8 ++++---- packages/standard-components/package.json | 2 +- packages/string-templates/package.json | 2 +- packages/worker/package.json | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lerna.json b/lerna.json index 75945feb69..6c825ec9cf 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "0.8.14", + "version": "0.8.15", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/builder/package.json b/packages/builder/package.json index 3940fcb746..62c01dc394 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "0.8.14", + "version": "0.8.15", "license": "AGPL-3.0", "private": true, "scripts": { @@ -64,9 +64,9 @@ }, "dependencies": { "@budibase/bbui": "^1.58.13", - "@budibase/client": "^0.8.14", + "@budibase/client": "^0.8.15", "@budibase/colorpicker": "1.1.2", - "@budibase/string-templates": "^0.8.14", + "@budibase/string-templates": "^0.8.15", "@budibase/svelte-ag-grid": "^1.0.4", "@sentry/browser": "5.19.1", "@svelteschool/svelte-forms": "0.7.0", diff --git a/packages/cli/package.json b/packages/cli/package.json index ef4f9f2ce0..5784f5db0d 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "cli", - "version": "0.8.13", + "version": "0.8.15", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": "src/index.js", diff --git a/packages/client/package.json b/packages/client/package.json index 838df41676..8068f39248 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "0.8.14", + "version": "0.8.15", "license": "MPL-2.0", "main": "dist/budibase-client.js", "module": "dist/budibase-client.js", @@ -9,13 +9,13 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/string-templates": "^0.8.14", + "@budibase/string-templates": "^0.8.15", "regexparam": "^1.3.0", "shortid": "^2.2.15", "svelte-spa-router": "^3.0.5" }, "devDependencies": { - "@budibase/standard-components": "^0.8.14", + "@budibase/standard-components": "^0.8.15", "@rollup/plugin-commonjs": "^16.0.0", "@rollup/plugin-node-resolve": "^10.0.0", "fs-extra": "^8.1.0", diff --git a/packages/server/package.json b/packages/server/package.json index f6c293bdab..1ced9670cd 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "0.8.14", + "version": "0.8.15", "description": "Budibase Web Server", "main": "src/electron.js", "repository": { @@ -71,8 +71,8 @@ "author": "Budibase", "license": "AGPL-3.0-or-later", "dependencies": { - "@budibase/client": "^0.8.14", - "@budibase/string-templates": "^0.8.14", + "@budibase/client": "^0.8.15", + "@budibase/string-templates": "^0.8.15", "@elastic/elasticsearch": "7.10.0", "@koa/router": "8.0.0", "@sendgrid/mail": "7.1.1", @@ -126,7 +126,7 @@ "zlib": "1.0.5" }, "devDependencies": { - "@budibase/standard-components": "^0.8.14", + "@budibase/standard-components": "^0.8.15", "@jest/test-sequencer": "^24.8.0", "cross-env": "^7.0.3", "electron": "10.1.3", diff --git a/packages/standard-components/package.json b/packages/standard-components/package.json index d8f84ef58d..9cc5759ee8 100644 --- a/packages/standard-components/package.json +++ b/packages/standard-components/package.json @@ -35,7 +35,7 @@ "keywords": [ "svelte" ], - "version": "0.8.14", + "version": "0.8.15", "license": "MIT", "gitHead": "4b6efc42ed3273595c7a129411f4d883733d3321", "dependencies": { diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 433384445b..494c5406dc 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "0.8.14", + "version": "0.8.15", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.js", "module": "src/index.js", diff --git a/packages/worker/package.json b/packages/worker/package.json index a84feb1641..df5303d5d7 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/deployment", "email": "hi@budibase.com", - "version": "0.8.14", + "version": "0.8.15", "description": "Budibase Deployment Server", "main": "src/index.js", "repository": { From b0ffb8dcb87b5fde7604c79ed9a79b1b419bb507 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 12 Apr 2021 19:51:11 +0100 Subject: [PATCH 4/6] v0.8.16 --- lerna.json | 2 +- packages/builder/package.json | 6 +++--- packages/client/package.json | 6 +++--- packages/server/package.json | 8 ++++---- packages/standard-components/package.json | 2 +- packages/string-templates/package.json | 2 +- packages/worker/package.json | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lerna.json b/lerna.json index 6c825ec9cf..bf193f9a81 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "0.8.15", + "version": "0.8.16", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/builder/package.json b/packages/builder/package.json index 62c01dc394..df83d69095 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "0.8.15", + "version": "0.8.16", "license": "AGPL-3.0", "private": true, "scripts": { @@ -64,9 +64,9 @@ }, "dependencies": { "@budibase/bbui": "^1.58.13", - "@budibase/client": "^0.8.15", + "@budibase/client": "^0.8.16", "@budibase/colorpicker": "1.1.2", - "@budibase/string-templates": "^0.8.15", + "@budibase/string-templates": "^0.8.16", "@budibase/svelte-ag-grid": "^1.0.4", "@sentry/browser": "5.19.1", "@svelteschool/svelte-forms": "0.7.0", diff --git a/packages/client/package.json b/packages/client/package.json index 8068f39248..fc68546dea 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "0.8.15", + "version": "0.8.16", "license": "MPL-2.0", "main": "dist/budibase-client.js", "module": "dist/budibase-client.js", @@ -9,13 +9,13 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/string-templates": "^0.8.15", + "@budibase/string-templates": "^0.8.16", "regexparam": "^1.3.0", "shortid": "^2.2.15", "svelte-spa-router": "^3.0.5" }, "devDependencies": { - "@budibase/standard-components": "^0.8.15", + "@budibase/standard-components": "^0.8.16", "@rollup/plugin-commonjs": "^16.0.0", "@rollup/plugin-node-resolve": "^10.0.0", "fs-extra": "^8.1.0", diff --git a/packages/server/package.json b/packages/server/package.json index 1ced9670cd..245bb01fbf 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "0.8.15", + "version": "0.8.16", "description": "Budibase Web Server", "main": "src/electron.js", "repository": { @@ -71,8 +71,8 @@ "author": "Budibase", "license": "AGPL-3.0-or-later", "dependencies": { - "@budibase/client": "^0.8.15", - "@budibase/string-templates": "^0.8.15", + "@budibase/client": "^0.8.16", + "@budibase/string-templates": "^0.8.16", "@elastic/elasticsearch": "7.10.0", "@koa/router": "8.0.0", "@sendgrid/mail": "7.1.1", @@ -126,7 +126,7 @@ "zlib": "1.0.5" }, "devDependencies": { - "@budibase/standard-components": "^0.8.15", + "@budibase/standard-components": "^0.8.16", "@jest/test-sequencer": "^24.8.0", "cross-env": "^7.0.3", "electron": "10.1.3", diff --git a/packages/standard-components/package.json b/packages/standard-components/package.json index 9cc5759ee8..b5d013943e 100644 --- a/packages/standard-components/package.json +++ b/packages/standard-components/package.json @@ -35,7 +35,7 @@ "keywords": [ "svelte" ], - "version": "0.8.15", + "version": "0.8.16", "license": "MIT", "gitHead": "4b6efc42ed3273595c7a129411f4d883733d3321", "dependencies": { diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 494c5406dc..53d5ab27fa 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "0.8.15", + "version": "0.8.16", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.js", "module": "src/index.js", diff --git a/packages/worker/package.json b/packages/worker/package.json index df5303d5d7..5576da31fe 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/deployment", "email": "hi@budibase.com", - "version": "0.8.15", + "version": "0.8.16", "description": "Budibase Deployment Server", "main": "src/index.js", "repository": { From 9f22ab0a1a30e9d119994df0e19794b9574c8864 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 16 Apr 2021 13:47:30 +0100 Subject: [PATCH 5/6] Some fixes for creation/editing of table columns. --- .../DataTable/modals/CreateEditColumn.svelte | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte index d269124219..6de84eadde 100644 --- a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte @@ -51,12 +51,14 @@ ) $: required = !!field?.constraints?.presence || primaryDisplay $: uneditable = - $backendUiStore.selectedTable?._id === TableNames.USERS && - UNEDITABLE_USER_FIELDS.includes(field.name) + ($backendUiStore.selectedTable?._id === TableNames.USERS && + UNEDITABLE_USER_FIELDS.includes(field.name)) || + (originalName && field.type === LINK_TYPE) + $: invalid = (field.type === LINK_TYPE && !field.tableId) || Object.keys($backendUiStore.draftTable.schema).some( - key => key === field.name + key => key === field.name && key !== originalName ) // used to select what different options can be displayed for column type @@ -162,19 +164,22 @@ if (!linkTable) { return null } - const thisName = truncate(table.name, { length: 15 }), - linkName = truncate(linkTable.name, { length: 15 }) + const thisName = truncate(table.name, { length: 14 }), + linkName = truncate(linkTable.name, { length: 14 }) return [ { name: `Many ${thisName} rows → many ${linkName} rows`, + alt: `Many ${table.name} rows → many ${linkTable.name} rows`, value: RelationshipTypes.MANY_TO_MANY, }, { name: `One ${linkName} row → many ${thisName} rows`, + alt: `One ${linkTable.name} rows → many ${table.name} rows`, value: RelationshipTypes.ONE_TO_MANY, }, { name: `One ${thisName} row → many ${linkName} rows`, + alt: `One ${table.name} rows → many ${linkTable.name} rows`, value: RelationshipTypes.MANY_TO_ONE, }, ] @@ -267,13 +272,13 @@
- {#each relationshipOptions as { value, name }} + {#each relationshipOptions as { value, name, alt }} -
+
From d19e350df82a088a88b9dc91f71921f2321d7704 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 16 Apr 2021 14:43:20 +0100 Subject: [PATCH 6/6] Formatting. --- .../components/backend/DataTable/modals/CreateEditColumn.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte index 6de84eadde..4583e4668b 100644 --- a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte @@ -52,7 +52,7 @@ $: required = !!field?.constraints?.presence || primaryDisplay $: uneditable = ($backendUiStore.selectedTable?._id === TableNames.USERS && - UNEDITABLE_USER_FIELDS.includes(field.name)) || + UNEDITABLE_USER_FIELDS.includes(field.name)) || (originalName && field.type === LINK_TYPE) $: invalid =