Merge pull request #7574 from Budibase/bug/sev4/delete-formula-column

Exclude formula columns from Sql drop column
This commit is contained in:
Michael Drury 2022-09-13 11:27:59 +02:00 committed by GitHub
commit 87197b61af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -96,7 +96,9 @@ function generateSchema(
const deletedColumns = Object.entries(oldTable.schema) const deletedColumns = Object.entries(oldTable.schema)
.filter( .filter(
([key, schema]) => ([key, schema]) =>
schema.type !== FieldTypes.LINK && table.schema[key] == null schema.type !== FieldTypes.LINK &&
schema.type !== FieldTypes.FORMULA &&
table.schema[key] == null
) )
.map(([key]) => key) .map(([key]) => key)
deletedColumns.forEach(key => { deletedColumns.forEach(key => {