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

rebase_migration: Unapply migrations while rebase. #346

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

roanster007
Copy link

Previously, while rebasing migrations, if the migration to be rebased is already applied, it would throw out an error asking to un apply the migration before rebasing.

This commit un applies the migrations and rebases them when the migrations to be rebased are already applied. This is done by first creating a --merge migration, un applying the previous migrations, removing the --merge migration, and then rebasing the existing migrations.

This is extracted from #343.

Fixes #184

Previously, while rebasing migrations, if the migration to be
rebased is already applied, it would throw out an error asking
to un apply the migration before rebasing.

This commit un applies the migrations and rebases them when
the migrations to be rebased are already applied. This is done
by first creating a --merge migration, un applying the previous
migrations, removing the --merge migration, and then rebasing
the existing migrations.

Fixes adamchainz#184
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.

Option to force rebase_migration to rebase even if the migration has been applied
1 participant