From 75217efee48c92099a85d503b9e118ec1a48d247 Mon Sep 17 00:00:00 2001 From: Dean Date: Mon, 22 Jul 2024 12:37:40 +0100 Subject: [PATCH] Fix to switch internal source check from table.sql to table.sourceType === DB_TYPE_INTERNAL. After the SQS changes table.sql becomes true for internal types --- .../backend/DataTable/modals/CreateEditColumn.svelte | 2 +- packages/builder/src/dataBinding.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte index e1ef6f1036..f982ef5333 100644 --- a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte @@ -682,7 +682,7 @@ {errors} /> {:else if editableColumn.type === FORMULA_TYPE} - {#if !table.sql} + {#if !externalTable}
diff --git a/packages/builder/src/dataBinding.js b/packages/builder/src/dataBinding.js index 6defe94108..0cd9f8a4cf 100644 --- a/packages/builder/src/dataBinding.js +++ b/packages/builder/src/dataBinding.js @@ -29,7 +29,7 @@ import { JSONUtils, Constants } from "@budibase/frontend-core" import ActionDefinitions from "components/design/settings/controls/ButtonActionEditor/manifest.json" import { environment, licensing } from "stores/portal" import { convertOldFieldFormat } from "components/design/settings/controls/FieldConfiguration/utils" -import { FIELDS } from "constants/backend" +import { FIELDS, DB_TYPE_INTERNAL } from "constants/backend" import { FieldType } from "@budibase/types" const { ContextScopes } = Constants @@ -991,7 +991,7 @@ export const getSchemaForDatasource = (asset, datasource, options) => { } // Determine if we should add ID and rev to the schema - const isInternal = table && !table.sql + const isInternal = table && table?.sourceType === DB_TYPE_INTERNAL const isDSPlus = ["table", "link", "viewV2"].includes(datasource.type) // ID is part of the readable schema for all tables