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

feat: Add migration script for phone number normalisation #882

Conversation

anku255
Copy link
Contributor

@anku255 anku255 commented Nov 17, 2023

Summary of change

This pull request introduces phone number normalisation migration script that is supposed to be run on the all the core instances after migrating to version 7.0.12.

Related issues

Test Plan

I locally tested the script by creating passwordless_users, passwordless_devices, and passwordless_user_to_tenant tables, seeding them with unnormalized phone numbers, and confirming successful normalization after script execution. Tests covered both PostgreSQL and MySQL databases.

Screenshots

Click here to see the script output logs when run with 20K rows in each table.

Checklist for important updates

  • Changelog has been updated
    • If there are any db schema changes, mention those changes clearly
  • coreDriverInterfaceSupported.json file has been updated (if needed)
  • pluginInterfaceSupported.json file has been updated (if needed)
  • Changes to the version if needed
    • In build.gradle
  • If added a new paid feature, edit the getPaidFeatureStats function in FeatureFlag.java file
  • Had installed and ran the pre-commit hook
  • If there are new dependencies that have been added in build.gradle, please make sure to add them
    in implementationDependencies.json.
  • Update function getValidFields in io/supertokens/config/CoreConfig.java if new aliases were added for any core config (similar to the access_token_signing_key_update_interval config alias).
  • Issue this PR against the latest non released version branch.
    • To know which one it is, run find the latest released tag (git tag) in the format vX.Y.Z, and then find the
      latest branch (git branch --all) whose X.Y is greater than the latest released tag.
    • If no such branch exists, then create one from the latest released branch.
  • If added a foreign key constraint on app_id_to_user_id table, make sure to delete from this table when deleting the user as well if deleteUserIdMappingToo is false.

CHANGELOG.md Show resolved Hide resolved
migration_scripts/to_version_7_1/index.js Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
migration_scripts/to_version_7_1/index.js Outdated Show resolved Hide resolved
migration_scripts/to_version_7_1/index.js Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
migration_scripts/to_version_7_1/index.js Outdated Show resolved Hide resolved
migration_scripts/to_version_7_1_12/index.js Outdated Show resolved Hide resolved
migration_scripts/to_version_7_1_12/index.js Outdated Show resolved Hide resolved
migration_scripts/to_version_7_1_12/index.js Outdated Show resolved Hide resolved
migration_scripts/to_version_7_1_12/index.js Outdated Show resolved Hide resolved
migration_scripts/to_version_7_1_12/index.js Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
migration_scripts/to_version_7_1_12/index.js Outdated Show resolved Hide resolved
@rishabhpoddar rishabhpoddar merged commit 3ac2f20 into feat/phone-number-normalisation-base Nov 20, 2023
2 of 3 checks passed
@rishabhpoddar rishabhpoddar deleted the feat/phone-number-normalisation-migration-script branch November 20, 2023 10:39
rishabhpoddar pushed a commit that referenced this pull request Nov 20, 2023
… Migration script (#885)

* feat: Normalise phoneNumber received in the input before processing (#881)

* feat: normalise phoneNumber received in the input before processing

* feat: PR changes

* feat: PR changes

* feat: Improve test for invalid phone number inputs (#884)

* feat: Add migration script for phone number normalisation (#882)

* feat: Add migration script for phone number normalisation

* feat: PR changes

* feat: PR changes

* feat: PR changes

* feat: PR changes

* feat: PR changes

* feat: PR changes
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.

2 participants