-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
refactor(migrations): add commands to make file to run migrations for api v2 #5169
Merged
likhinbopanna
merged 11 commits into
main
from
5749-feature-create-a-command-for-running-migrations-from-separate-directories
Jul 3, 2024
Merged
refactor(migrations): add commands to make file to run migrations for api v2 #5169
likhinbopanna
merged 11 commits into
main
from
5749-feature-create-a-command-for-running-migrations-from-separate-directories
Jul 3, 2024
Conversation
This file contains 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
…grations-from-separate-directories
…grations-from-separate-directories
Co-authored-by: Sanchith Hegde <[email protected]>
SanchithHegde
approved these changes
Jul 3, 2024
sai-harsha-vardhan
approved these changes
Jul 3, 2024
likhinbopanna
deleted the
5749-feature-create-a-command-for-running-migrations-from-separate-directories
branch
July 3, 2024 10:20
Narayanbhat166
added a commit
that referenced
this pull request
Jul 4, 2024
… api v2 (#5169) Co-authored-by: Sanchith Hegde <[email protected]>
pixincreate
added a commit
that referenced
this pull request
Jul 5, 2024
…ify-cypress * 'main' of github.com:juspay/hyperswitch: (22 commits) refactor: Adding millisecond to Kafka timestamp (#5202) chore(version): 2024.07.05.0 fix(user_auth_method): make id option in auth select (#5213) Docs: Updated API - ref for payments (#5172) feat(core): add merchant order reference id (#5197) feat(analytics): Refund status serialization issue for ckh analytics (#5199) fix(router): `override setup_future_usage` filed to on_session based on merchant config (#5195) feat(cypress): make tests forcefully skippable (#5176) feat(core): Added integrity framework for Authorize and Sync flow with connector as Stripe (#5109) ci(cypress): Update card number for adyen and status for paypal (#5192) refactor(cypress): error handling and add sync refunds in places where missing (#5128) feat(analytics): FRM Analytics (#4880) chore(version): 2024.07.04.0 feat(pm_auth): Added balance check for PM auth bank account (#5054) refactor(payment_methods): add appropriate missing logs (#5190) refactor(migrations): add commands to make file to run migrations for api v2 (#5169) chore(version): 2024.07.03.0 fix(event): Updated the ApiEventMetric (#5126) feat(router): add refunds manual-update api (#5094) refactor(payment_link): logs payment links logs coverage (#4918) ...
Narayanbhat166
added a commit
that referenced
this pull request
Jul 8, 2024
… api v2 (#5169) Co-authored-by: Sanchith Hegde <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The diesel migration command runs the migrations from the migrations directory. There is no distinction between whether these migrations have to be run before the deployment or after the deployment.
This PR introduces a separate migrations directory, in order to run backwards incompatible migrations. In order to run the migrations, run the below command
In order to revert the migrations
Note on running migrations in higher environments
When running the migrations in higher environments, we need not run the diesel migration run command. It is always better to run the individual migrations to ensure that all the migrations that are run are backwards compatible. It also depends on when to run the migrations, some migrations can be run before the new version is deployed ( migrations which are backwards compatible ), and few migrations have to be run after the new version of application is deployed ( which are not backwards compatible ). The database admin / the user who is running these queries should be aware of what commands are being run and whether this will affect the current application.
Motivation and Context
How did you test it?
Run the commands locally
Checklist
cargo +nightly fmt --all
cargo clippy