Another test fix (yay for this one)

This commit is contained in:
mike12345567 2024-08-09 14:54:47 +01:00
parent 3e1a0a60b4
commit 28a10bf908
1 changed files with 6 additions and 2 deletions

View File

@ -15,7 +15,7 @@ import { helpers, utils } from "@budibase/shared-core"
import { pipeline } from "stream/promises"
import tmp from "tmp"
import fs from "fs"
import { merge } from "lodash"
import { merge, cloneDeep } from "lodash"
type PrimitiveTypes =
| FieldType.STRING
@ -293,7 +293,11 @@ function copyExistingPropsOver(
table.schema[key]
table.schema[key] = {
// merge the properties - anything missing will be filled in, old definition preferred
...merge(fetchedColumnDefinition, existingTableSchema[key]),
// have to clone due to the way merge works
...merge(
cloneDeep(fetchedColumnDefinition),
existingTableSchema[key]
),
// always take externalType and autocolumn from the fetched definition
externalType:
existingTableSchema[key].externalType ||