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

Rebases the wrong migration when merging branches #80

Closed
tolomea opened this issue May 21, 2021 · 5 comments · Fixed by #261
Closed

Rebases the wrong migration when merging branches #80

tolomea opened this issue May 21, 2021 · 5 comments · Fixed by #261

Comments

@tolomea
Copy link

tolomea commented May 21, 2021

When merging a branch (e.g. main) into the current one I would expect the current branches migrations to rebase on top of the incoming branches ones, similar to if you rebase onto main instead of merging main. However instead it rebased the migrations in main. I suspect this is because ours and theirs are reversed in rebases vs merges.

@adamchainz
Copy link
Owner

The rebase-migration command is for rebases. I guess we could take a flag, or have a different command, for merges.

@tolomea
Copy link
Author

tolomea commented May 21, 2021

is there currently a work flow for merges?

@adamchainz
Copy link
Owner

No, nothing currently. I always rebase so it doesn't affect me.

@dmitrysleptsov
Copy link
Contributor

@adamchainz , I found myself in the same situation as I'm mostly using git merge command. What do you think about moving find_migration_names function inside Command here. It would allow to simply inherit the class and add any custom logic to deal with git merge ourselves.

I can prepare a PR

@adamchainz
Copy link
Owner

Released in 2.8.0, thanks @dmitrysleptsov 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants