Add Support for --up Flag in Migration Process - #79
Open
Khaleelhabeeb wants to merge 1 commit into
Open
Conversation
feat: Add support for --up flag in migration process - Updated `migrations.py` to handle the `--up` flag for running upward migrations. - Modified `cli.py` to include a `--up` flag in the `migrate` command, allowing users to specify migration direction. - Ensured that the default behavior of the `inspira_migrate` command is to run down migrations unless the `--up` flag is provided. - Checked for mutual exclusivity between `--up` and `--down` flags to avoid conflicting directions. These changes allow users to easily specify migration direction using the --up flag inspira_migrate --up will run up migrations
cicekhayri
previously approved these changes
Apr 13, 2024
cicekhayri
self-requested a review
April 13, 2024 05:59
Author
|
i think the failing test is because the teardown_migration_directory fixture might be deleting the migrations directory after each test, leading to the FileNotFoundError during test_run_migrations_down. possible solution: And all test are passing when running locally |
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
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.
feat: Add support for --up flag in migration process
migrations.pyto handle the--upflag for running upward migrations.cli.pyto include a--upflag in themigratecommand, allowing users to specify migration direction.inspira_migratecommand is to run down migrations unless the--upflag is provided.--upand--downflags to avoid conflicting directions.These changes allow users to easily specify migration direction using the --up flag, " inspira_migrate --up" will run up migrations
fixes issues #72