#Is there a Reason why E-Mails must be unique?
1 messages · Page 1 of 1 (latest)
Don't think so but please do it in UI
CC: @frozen pumice
Hello there, I can't remember if we allow toggling the isUnique constraint on standard fields
You will definitly need to pass through the whole API, a manual db toggle won't work
As there's a lot of side effects
Does not seem to be doable natively, input is disabled
Can't remember the consensus on this one @dapper wadi or @velvet sedge might have more information about this
Thanks, could you maybe give me an example call how I could do it? or can I copy an call from another object? and do you plan to allow to change the standard fields in the Gui?
After some investigation the isUnique toggle on standard field should be available by the end of next week
export const FLAT_FIELD_METADATA_EDITABLE_PROPERTIES = {
custom: [
'defaultValue',
'description',
'icon',
'isActive',
'isLabelSyncedWithName',
'isUnique',
'label',
'name',
'options',
'settings',
],
standard: [
'defaultValue',
'description',
'icon',
'isActive',
'label',
'options',
'settings',
//TODO : uncomment once universal identifier on standard fields is migrated
// 'isUnique', // not editable for standard fields with standard unique constraint
],
} as const satisfies Record<'standard' | 'custom', (keyof FlatFieldMetadata)[]>;
it's currently buggy but will be fixed by https://github.com/twentyhq/twenty/pull/16893 release
Even passing by the API won't be authorized for the moment, you will face a validation error
As a workaround you can still create a custom non unique field
Will ping you once this has been delivered for self hosters
thanks a lot, I can wait another week
Hi @frozen pumice , I installed now 1.15 and it's still not editable. Is it correct?
Hey Fendle, yes not handled yet
thanks
Hi @frozen pumice , should it be now possible? It's in 1.16 still deactivated and I can't change it