From b3a0cba9614b158a5f541e4dc6e3ca596112d672 Mon Sep 17 00:00:00 2001 From: Marie <51697796+ijreilly@users.noreply.github.com> Date: Wed, 25 Sep 2024 11:31:07 +0200 Subject: [PATCH] [Phones migration][Fix] Remove field from view after creation (#7243) --- .../0-32/0-32-migrate-phone-fields-to-phones.command.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/twenty-server/src/database/commands/upgrade-version/0-32/0-32-migrate-phone-fields-to-phones.command.ts b/packages/twenty-server/src/database/commands/upgrade-version/0-32/0-32-migrate-phone-fields-to-phones.command.ts index dc7f56e20..115074cb1 100644 --- a/packages/twenty-server/src/database/commands/upgrade-version/0-32/0-32-migrate-phone-fields-to-phones.command.ts +++ b/packages/twenty-server/src/database/commands/upgrade-version/0-32/0-32-migrate-phone-fields-to-phones.command.ts @@ -168,6 +168,11 @@ export class MigratePhoneFieldsToPhonesCommand extends ActiveWorkspacesCommandRu defaultValue: null, name: 'phones', } satisfies CreateFieldInput); + + await this.viewService.removeFieldFromViews({ + workspaceId: workspaceId, + fieldId: standardPersonPhonesFieldType.id, + }); } // Copy phone data from Text type to Phones type