twenty/packages/twenty-server/test
gitstart-app[bot] fa241fa4e9
Handle migration of Phone field to Phones field (#7128)
This PR was created by [GitStart](https://gitstart.com/) to address the
requirements from this ticket:
[TWNTY-6260](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-6260).
This ticket was imported from:
[TWNTY-6260](https://github.com/twentyhq/twenty/issues/6260)

 --- 

### Description

This is the second PR on TWNTY-6260 which handles data migration of
Phone field to Phones field.\
\
How to Test?\
 Follow the below steps:

- On the main branch, 
- go to
`packages/twenty-server/src/database/typeorm-seeds/workspace/people.ts`
and change any person's phone number to a string with characters for
example: "test invalid phone", and then reset the DB.
  - reset database using `npx nx database:reset twenty-server`
- This is to make sure that invalid numbers will be handled properly. We
should use the invalid value itself to avoid removing data and see how
the behavior is on the front end. should be the same as in the main, the
display shows the invalid value, but the input is empty when you click,
and then you can update.
- Checkout to `TWNTY-6260-phone-migration` branch
- Rebuild typescript using `npx nx build twenty-server`
- Run command `yarn command:prod upgrade-0.32` to do migration
- Run both backend and frontend to see the migrated field

### Demo

- **Loom Video:**\

<https://www.loom.com/share/4b9bcb423cee447d8ad09852a83b27da?sid=ed74ecaa-0339-4575-acdc-a863e95e94fd>

### Refs

#6260

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Marie Stoppa <marie.stoppa@essec.edu>
Co-authored-by: Weiko <corentin@twenty.com>
2024-09-24 16:31:30 +02:00
..
utils feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
activities.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
activity-targets.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
api-keys.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
attachments.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
audit-logs.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
auth.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
blocklists.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
calendar-channel-event-associations.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
calendar-channels.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
calendar-event-participants.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
comments.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
companies.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
company.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
connected-accounts.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
favorites.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
message-channel-message-associations.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
message-channels.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
message-participants.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
message-threads.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
note-targets.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
notes.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
objects.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
opportunities.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
people.integration-spec.ts Handle migration of Phone field to Phones field (#7128) 2024-09-24 16:31:30 +02:00
serverless-functions.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
task-targets.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
tasks.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
timeline-activities.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
view-fields.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
view-filters.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
view-sorts.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
views.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
webhooks.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00
workspace-members.integration-spec.ts feat: add integration tests (#6923) 2024-09-20 11:02:52 +02:00