-
Notifications
You must be signed in to change notification settings - Fork 4.2k
refactor(v2_migrations): re-organize v2 migrations #5760
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Review changes with SemanticDiff. Analyzed 12 of 46 files. Overall, the semantic diff is 27% smaller than the GitHub diff. File Information
|
7b1b73e
to
ad1c42a
Compare
jarnura
previously approved these changes
Aug 31, 2024
Aprabhat19
previously approved these changes
Sep 2, 2024
e7d4945
Aprabhat19
approved these changes
Sep 2, 2024
jarnura
approved these changes
Sep 2, 2024
Narayanbhat166
approved these changes
Sep 2, 2024
pixincreate
added a commit
that referenced
this pull request
Sep 3, 2024
…config-fix * 'main' of github.com:juspay/hyperswitch: feat: add profile_id authentication for business profile update and list (#5673) chore(version): 2024.09.03.0 feat(user): implement invitations api (#5769) feat(connector): [Adyenplatform] add webhooks for payout (#5749) refactor(v2_migrations): re-organize v2 migrations (#5760) chore: add wasm support for connector additional details (#5712) refactor(connector): Move globepay, powertranz, tsys, worldline to hyperswitch_connectors (#5758) fix(cypress): fix cypress throwing error when `connectorId` is not passed and miscellaneous fixes (#5746) chore: fix typos (#5766) refactor(business_profile): change id for business profile (#5748)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-framework
Area: Framework
api-v2
C-refactor
Category: Refactor
M-database-changes
Metadata: This PR involves database schema changes
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
This PR reorganizes the v2 related database migrations into the following 4 groups, instead of the previous migrations which were organized based on tables affected:
Migrations that only add new columns: These migrations can/should be run fearlessly, since they only introduce new columns and thus should not affect the working of the v1 application.
Migrations to re-create ID columns for v2: These migrations only involve dropping the
SERIAL
id
columns from the v1 application in favor of theVARCHAR(64)
id
columns for the v2 application.Migrations that update database constraints: These migrations are concerned with updating the primary key constraints, and updating unique constraints and indexes as required by the v2 application.
Migrations that drop columns from v1: These migrations drop columns from the v1 application that are no longer read by the v2 application. These should not be run on any of our hosted environments, until the v1 application is no longer in use.
❗ Running these migrations on hosted environments will cause loss of data!
In addition, this PR addresses some clippy lints thrown from v2 code.
Additional Changes
This PR re-organizes the existing v2 related database migrations.
Motivation and Context
This should make it easier for us to run the queries which do not affect the functioning of the v1 application and avoid running the destructive ones with higher confidence.
How did you test it?
Sanity testing with Postman.
Checklist
cargo +nightly fmt --all
cargo clippy