1
0
Fork 0
mirror of synced 2024-07-13 10:15:49 +12:00

Merge pull request #9923 from Budibase/fix/9790

SQL formulas - keeping after fetching
This commit is contained in:
Michael Drury 2023-03-07 15:58:25 +00:00 committed by GitHub
commit 5d166421bf

View file

@ -223,14 +223,15 @@ function shouldCopySpecialColumn(
column: { type: string },
fetchedColumn: { type: string } | undefined
) {
const isFormula = column.type === FieldTypes.FORMULA
const specialTypes = [
FieldTypes.OPTIONS,
FieldTypes.LONGFORM,
FieldTypes.ARRAY,
FieldTypes.FORMULA,
]
// column has been deleted, remove
if (column && !fetchedColumn) {
// column has been deleted, remove - formulas will never exist, always copy
if (!isFormula && column && !fetchedColumn) {
return false
}
const fetchedIsNumber =