From ad61efe6ed0e7a7f1872e7d399362b2850d6cc5e Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Mon, 24 Jun 2024 16:39:17 +0200 Subject: [PATCH] Remove multi select usage (#6004) As per title! Also, I'm removing an incorrect logic in the enum migration runner that takes care of the case where we have no defaultValue but non nullable which is not a valid business case. --- .../utils/formatFieldMetadataItemsAsFilterDefinitions.ts | 1 - .../services/workspace-migration-enum.service.ts | 4 ---- 2 files changed, 5 deletions(-) diff --git a/packages/twenty-front/src/modules/object-metadata/utils/formatFieldMetadataItemsAsFilterDefinitions.ts b/packages/twenty-front/src/modules/object-metadata/utils/formatFieldMetadataItemsAsFilterDefinitions.ts index c5df10c85c..222070f21b 100644 --- a/packages/twenty-front/src/modules/object-metadata/utils/formatFieldMetadataItemsAsFilterDefinitions.ts +++ b/packages/twenty-front/src/modules/object-metadata/utils/formatFieldMetadataItemsAsFilterDefinitions.ts @@ -22,7 +22,6 @@ export const formatFieldMetadataItemsAsFilterDefinitions = ({ FieldMetadataType.Address, FieldMetadataType.Relation, FieldMetadataType.Select, - FieldMetadataType.MultiSelect, FieldMetadataType.Currency, ].includes(field.type) ) { diff --git a/packages/twenty-server/src/engine/workspace-manager/workspace-migration-runner/services/workspace-migration-enum.service.ts b/packages/twenty-server/src/engine/workspace-manager/workspace-migration-runner/services/workspace-migration-enum.service.ts index 05ebc03704..03dd078fa6 100644 --- a/packages/twenty-server/src/engine/workspace-manager/workspace-migration-runner/services/workspace-migration-enum.service.ts +++ b/packages/twenty-server/src/engine/workspace-manager/workspace-migration-runner/services/workspace-migration-enum.service.ts @@ -49,10 +49,6 @@ export class WorkspaceMigrationEnumService { typeof enumValue !== 'string', ); - if (!columnDefinition.isNullable && !columnDefinition.defaultValue) { - columnDefinition.defaultValue = serializeDefaultValue(enumValues[0]); - } - const oldColumnName = `${columnDefinition.columnName}_old_${v4()}`; // Rename old column