1
0
Fork 0
mirror of synced 2024-09-20 11:27:56 +12:00

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

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 ||