From b51d24891a8d9cf5d24c392cb43f4dd38a4d2e73 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Wed, 29 Jun 2022 14:11:39 +0100 Subject: [PATCH] Remove array type option for JSON columns --- .../DataTable/modals/CreateEditColumn.svelte | 7 ------- .../builder/src/constants/backend/index.js | 4 ---- packages/server/yarn.lock | 18 +++++++++--------- 3 files changed, 9 insertions(+), 20 deletions(-) diff --git a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte index 77ab75827f..ce2b97bcba 100644 --- a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte @@ -22,10 +22,8 @@ RelationshipTypes, ALLOWABLE_STRING_OPTIONS, ALLOWABLE_NUMBER_OPTIONS, - ALLOWABLE_JSON_OPTIONS, ALLOWABLE_STRING_TYPES, ALLOWABLE_NUMBER_TYPES, - ALLOWABLE_JSON_TYPES, SWITCHABLE_TYPES, } from "constants/backend" import { getAutoColumnInformation, buildAutoColumn } from "builderStore/utils" @@ -255,11 +253,6 @@ ALLOWABLE_NUMBER_TYPES.indexOf(field.type) !== -1 ) { return ALLOWABLE_NUMBER_OPTIONS - } else if ( - originalName && - ALLOWABLE_JSON_TYPES.indexOf(field.type) !== -1 - ) { - return ALLOWABLE_JSON_OPTIONS } else if (!external) { return [ ...Object.values(fieldDefinitions), diff --git a/packages/builder/src/constants/backend/index.js b/packages/builder/src/constants/backend/index.js index f906d770ca..f9efd70511 100644 --- a/packages/builder/src/constants/backend/index.js +++ b/packages/builder/src/constants/backend/index.js @@ -158,13 +158,9 @@ export const ALLOWABLE_NUMBER_TYPES = ALLOWABLE_NUMBER_OPTIONS.map( opt => opt.type ) -export const ALLOWABLE_JSON_OPTIONS = [FIELDS.JSON, FIELDS.ARRAY] -export const ALLOWABLE_JSON_TYPES = ALLOWABLE_JSON_OPTIONS.map(opt => opt.type) - export const SWITCHABLE_TYPES = [ ...ALLOWABLE_STRING_TYPES, ...ALLOWABLE_NUMBER_TYPES, - ...ALLOWABLE_JSON_TYPES, ] export const IntegrationTypes = { diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 82d7943354..7dd2021116 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1028,10 +1028,10 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.0.212": - version "1.0.212" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.0.212.tgz#7ce8bfa8c968f4aa7558bd2dd13ad3e1e3e40c8f" - integrity sha512-pCrAHr54d2onSbaUoCWP83LMJnm28PNIpBAmAhi2kNdSfaGTFY/Iw1sbGOE3G/9vNaB+RRXeibKEEPFjToOgAg== +"@budibase/backend-core@1.0.213": + version "1.0.213" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.0.213.tgz#da10d014b5e39457413a9b7f6ead54322d482855" + integrity sha512-ARqPhrev/da9WNXVIYSXN5M+cYLKSBYL7pvVVcwMXewp6KCR0gdUBHxuksnrmTbxqT43h7Uc/Zg1H/jYc1xQQQ== dependencies: "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1109,12 +1109,12 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.0.212": - version "1.0.212" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.0.212.tgz#d6d2528b9ec2ec47e79d3360d04feeb5d2900d1e" - integrity sha512-RcbDmz3pkReUHXAJDPzvgTYy0CBksw55XLbW0wNtDu2HVWP0ZXoiMMJjOxNDwMfL3q4eZitWgISa7QUDisDtMA== +"@budibase/pro@1.0.213": + version "1.0.213" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.0.213.tgz#80e6005bec51927d373d278dd8d8672c2f25a4d5" + integrity sha512-zhTMPZBv0IkQsdKz1ywnWaxmt/PMrw/EkW1dS8bIOAqHgFTUgawiMGrqrzH43Iw3JemMK7AvtI1EOhs+zrMWVg== dependencies: - "@budibase/backend-core" "1.0.212" + "@budibase/backend-core" "1.0.213" node-fetch "^2.6.1" "@budibase/standard-components@^0.9.139":