From 52947e4417a3f60b8f0908f794fe69596e966718 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Thu, 1 Sep 2022 17:21:42 +0100 Subject: [PATCH] Exclude formula columns from Sql drop column --- packages/server/src/integrations/base/sqlTable.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/server/src/integrations/base/sqlTable.ts b/packages/server/src/integrations/base/sqlTable.ts index 4b715e5f3a..af561e81c5 100644 --- a/packages/server/src/integrations/base/sqlTable.ts +++ b/packages/server/src/integrations/base/sqlTable.ts @@ -96,7 +96,9 @@ function generateSchema( const deletedColumns = Object.entries(oldTable.schema) .filter( ([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) deletedColumns.forEach(key => {