mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-27 14:24:06 +03:00
fix: can't create fields of type UUID (#2642)
This commit is contained in:
parent
5c8c141556
commit
4c1c6a3407
@ -14,6 +14,19 @@ export function convertFieldMetadataToColumnActions(
|
||||
fieldMetadata: FieldMetadataEntity,
|
||||
): WorkspaceMigrationColumnAction[] {
|
||||
switch (fieldMetadata.type) {
|
||||
case FieldMetadataType.UUID: {
|
||||
const defaultValue =
|
||||
fieldMetadata.defaultValue as FieldMetadataDefaultValue<FieldMetadataType.UUID>;
|
||||
|
||||
return [
|
||||
{
|
||||
action: WorkspaceMigrationColumnActionType.CREATE,
|
||||
columnName: fieldMetadata.targetColumnMap.value,
|
||||
columnType: 'uuid',
|
||||
defaultValue: serializeDefaultValue(defaultValue?.value),
|
||||
},
|
||||
];
|
||||
}
|
||||
case FieldMetadataType.TEXT: {
|
||||
const defaultValue =
|
||||
fieldMetadata.defaultValue as FieldMetadataDefaultValue<FieldMetadataType.TEXT>;
|
||||
|
@ -19,6 +19,7 @@ export function generateTargetColumnMap(
|
||||
const columnName = isCustomField ? `_${fieldName}` : fieldName;
|
||||
|
||||
switch (type) {
|
||||
case FieldMetadataType.UUID:
|
||||
case FieldMetadataType.TEXT:
|
||||
case FieldMetadataType.PHONE:
|
||||
case FieldMetadataType.EMAIL:
|
||||
|
Loading…
Reference in New Issue
Block a user