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 behaviour when renaming an applied migration #10

Open
adamchainz opened this issue Dec 11, 2020 · 4 comments
Open

rebase_migration behaviour when renaming an applied migration #10

adamchainz opened this issue Dec 11, 2020 · 4 comments

Comments

@adamchainz
Copy link
Owner

adamchainz commented Dec 11, 2020

As suggested by @tolomea.

Before renaming the migration, rebase-migration could roll it back from the local DB, perhaps with a prompt, or it could simply warn/error that the migration has already been applied.

@SleepyHarry
Copy link

SleepyHarry commented Dec 11, 2020

Perhaps simply renaming entries and fiddling the applied time in the django_migrations table would be sufficient (+/- a warning/error/prompt)

@adamchainz
Copy link
Owner Author

That's also an option. I'd be less inclined to take it though as it wouldn't prove that the rebased migration works in its new place in the history.

@tolomea
Copy link

tolomea commented Dec 11, 2020

from my POV the minimum bar is not creating a situation where the local DB has applied migrations that no longer exist, anything beyond that is bonus

@adamchainz
Copy link
Owner Author

I just released version 1.3.0 with the guard added in #26 .

@adamchainz adamchainz changed the title rebase-migrations behaviour when renaming an applied migration rebase_-_migrations behaviour when renaming an applied migration Aug 6, 2021
@adamchainz adamchainz changed the title rebase_-_migrations behaviour when renaming an applied migration rebase_migration behaviour when renaming an applied migration Aug 6, 2021
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

No branches or pull requests

3 participants