Merge branch 'feature/existing-table-import' of github.com:Budibase/budibase into feature/existing-table-import
This commit is contained in:
commit
72a3532cc8
|
@ -75,7 +75,11 @@ describe("run misc tests", () => {
|
|||
},
|
||||
})
|
||||
const dataImport = {
|
||||
csvString: "a,b,c,d\n1,2,3,4"
|
||||
csvString: "a,b,c,d\n1,2,3,4",
|
||||
schema: {},
|
||||
}
|
||||
for (let col of ["a", "b", "c", "d"]) {
|
||||
dataImport.schema[col] = { type: "string" }
|
||||
}
|
||||
await tableUtils.handleDataImport(
|
||||
config.getAppId(),
|
||||
|
|
|
@ -77,6 +77,9 @@ function parse(csvString, parsers) {
|
|||
}
|
||||
|
||||
function updateSchema({ schema, existingTable }) {
|
||||
if (!schema) {
|
||||
return schema
|
||||
}
|
||||
const finalSchema = {}
|
||||
const schemaKeyMap = {}
|
||||
Object.keys(schema).forEach(key => (schemaKeyMap[key.toLowerCase()] = key))
|
||||
|
|
Loading…
Reference in New Issue