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

Add Support for --up Flag in Migration Process #72

Open
cicekhayri opened this issue Jan 20, 2024 · 1 comment
Open

Add Support for --up Flag in Migration Process #72

cicekhayri opened this issue Jan 20, 2024 · 1 comment
Labels
good first issue Good for newcomers

Comments

@cicekhayri
Copy link
Owner

Implement functionality to handle the --up flag in the migration process, allowing users to specify the migration direction when running migrations.

@cicekhayri cicekhayri added the good first issue Good for newcomers label Jan 20, 2024
@Khaleelhabeeb
Copy link

to implement the functionality to handle the --up flag in your migration process, need to Modify the run_migrations function to accept an additional up parameter. Check if the up parameter is True, and if so, execute the execute_up_migration function instead of the execute_down_migration. Adjust the insert_migration function to properly handle incrementing the version number when running migrations in the upward direction.
Then update the cli.py to accept an additional flag called --up and we can run ' run_migration --up ' which will call the run_migrations function with the appropriate argument to trigger upward migrations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants