Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix standardId issues with phones field migration #7294

Merged
merged 4 commits into from
Sep 27, 2024

Conversation

ijreilly
Copy link
Collaborator

No description provided.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This pull request addresses standardId issues with the phones field migration, focusing on aligning the 'phones' field ID with the standard format used across the application.

  • Updated 'phones' field standardId in PERSON_STANDARD_FIELD_IDS to '20202020-3c51-43fa-8b6e-af39e29368ab'
  • Enhanced migration command in 0-30-migrate-phone-fields-to-phones.command.ts to handle standard and custom phone fields
  • Implemented data copying from deprecated phone fields to new phones fields
  • Added error handling and rollback mechanisms for the migration process
  • Updated view handling to reflect changes in phone field types

2 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings

Comment on lines 172 to 175
await this.metadataDataSource.query(
`UPDATE "metadata"."fieldMetadata" SET "standardId" = $1 where "id"=$2`,
[PERSON_STANDARD_FIELD_IDS.phones, standardPersonPhoneField.id],
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: standardPersonPhoneField.id is used instead of standardPersonPhonesField.id

Copy link
Contributor

@bosiraphael bosiraphael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bosiraphael bosiraphael merged commit e28d8dd into main Sep 27, 2024
8 checks passed
@bosiraphael bosiraphael deleted the fix-migration-phones branch September 27, 2024 14:52
harshit078 pushed a commit to harshit078/twenty that referenced this pull request Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants