twenty
twenty copied to clipboard
Support custom field deletion for custom composite fields
Context
This bug was fixed by not allowing the deletion of such fields. Let's support it!
Old: TypeORM is throwing an error due to the fact that we are asking the ORM to delete a column that does not exist. This is expected since composite fields are not simply 1:1 with the fieldMetadata but result in different columns. For example, an ADDRESS field will be mapped to multiple columns (xxx_street, xxx_state, ...).
Technical inputs
We should update the field_metadata service to handle composite fields. We can use utils such as isCompositeFieldMetadataType and CompositeFieldsDefinitionFunction to get the correct column names.
I've added a description with technical inputs
How can we manually delete these fields?