diff --git a/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte b/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte index bfca91afaa..d13a7c30db 100644 --- a/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte +++ b/packages/builder/src/components/backend/TableNavigator/modals/CreateTableModal.svelte @@ -2,21 +2,13 @@ import { goto, url } from "@roxi/routify" import { tables } from "stores/backend" import { notifications } from "@budibase/bbui" - import { - Input, - Label, - ModalContent, - Toggle, - Divider, - Layout, - } from "@budibase/bbui" + import { Input, Label, ModalContent, Layout } from "@budibase/bbui" import { datasources } from "stores/backend" import TableDataImport from "../TableDataImport.svelte" import { BUDIBASE_INTERNAL_DB_ID, BUDIBASE_DATASOURCE_TYPE, } from "constants/backend" - import { buildAutoColumn, getAutoColumnInformation } from "builderStore/utils" $: tableNames = $tables.list.map(table => table.name) $: selectedSource = $datasources.list.find( @@ -43,28 +35,12 @@ } let error = "" - let autoColumns = getAutoColumnInformation() + let schema = {} let rows = [] let allValid = true let displayColumn = null - function getAutoColumns() { - const selectedAutoColumns = {} - - Object.entries(autoColumns).forEach(([subtype, column]) => { - if (column.enabled) { - selectedAutoColumns[column.name] = buildAutoColumn( - name, - column.name, - subtype - ) - } - }) - - return selectedAutoColumns - } - function checkValid(evt) { const tableName = evt.target.value if (tableNames.includes(tableName)) { @@ -77,7 +53,7 @@ async function saveTable() { let newTable = { name, - schema: { ...schema, ...getAutoColumns() }, + schema: { ...schema }, rows, type: "internal", sourceId: targetDatasourceId, @@ -118,21 +94,6 @@ bind:value={name} {error} /> -
- -
-
- - - -
-
- - -
-
- -
- -