mirror of
https://github.com/lingble/twenty.git
synced 2025-11-01 13:17:57 +00:00
Fix standardId issues with phones field migration (#7294)
Co-authored-by: Weiko <corentin@twenty.com>
This commit is contained in:
@@ -168,6 +168,16 @@ export class MigratePhoneFieldsToPhonesCommand extends ActiveWorkspacesCommandRu
|
|||||||
name: 'phones',
|
name: 'phones',
|
||||||
} satisfies CreateFieldInput);
|
} satisfies CreateFieldInput);
|
||||||
|
|
||||||
|
// StandardId and isCustom are not exposed in CreateFieldInput
|
||||||
|
await this.metadataDataSource.query(
|
||||||
|
`UPDATE "metadata"."fieldMetadata" SET "standardId" = $1, "isCustom" = $2 where "id"=$3`,
|
||||||
|
[
|
||||||
|
PERSON_STANDARD_FIELD_IDS.phones,
|
||||||
|
'false',
|
||||||
|
standardPersonPhonesField.id,
|
||||||
|
],
|
||||||
|
);
|
||||||
|
|
||||||
await this.viewService.removeFieldFromViews({
|
await this.viewService.removeFieldFromViews({
|
||||||
workspaceId: workspaceId,
|
workspaceId: workspaceId,
|
||||||
fieldId: standardPersonPhonesField.id,
|
fieldId: standardPersonPhonesField.id,
|
||||||
|
|||||||
@@ -310,7 +310,7 @@ export const PERSON_STANDARD_FIELD_IDS = {
|
|||||||
xLink: '20202020-8fc2-487c-b84a-55a99b145cfd',
|
xLink: '20202020-8fc2-487c-b84a-55a99b145cfd',
|
||||||
jobTitle: '20202020-b0d0-415a-bef9-640a26dacd9b',
|
jobTitle: '20202020-b0d0-415a-bef9-640a26dacd9b',
|
||||||
phone: '20202020-4564-4b8b-a09f-05445f2e0bce',
|
phone: '20202020-4564-4b8b-a09f-05445f2e0bce',
|
||||||
phones: '34becd3e-3c51-43fa-8b6e-af39e29368ab',
|
phones: '20202020-0638-448e-8825-439134618022',
|
||||||
city: '20202020-5243-4ffb-afc5-2c675da41346',
|
city: '20202020-5243-4ffb-afc5-2c675da41346',
|
||||||
avatarUrl: '20202020-b8a6-40df-961c-373dc5d2ec21',
|
avatarUrl: '20202020-b8a6-40df-961c-373dc5d2ec21',
|
||||||
position: '20202020-fcd5-4231-aff5-fff583eaa0b1',
|
position: '20202020-fcd5-4231-aff5-fff583eaa0b1',
|
||||||
|
|||||||
Reference in New Issue
Block a user