What I need from migrations is collaboration. When I make a schema migration locally and push it to the repository, then 3 other PRs with their own migrations are being merged before mine, it is very likely that my local database will be in the wrong state. Correct me if I'm wrong, but using an ORM (be it Django, Prisma, liquibase, ...) to handle your migrations will only generate the SQL queries for you, it won't ha…
EF 6 had an interesting take on this problem. If two migrations had the same parent (aka we both branched and added a migration), whoever merged second would have to generate a "merge" migration to resolve the conflict. It wasn't the most elegant solution, or even a solution period, but it made the problem explicit. This happened because the full schema model was serialized and encoded into the migration journal tabl…
You try to push on a remote after somebody else, you have to create a merge commit.
But it would be nice to have a rebase to keep linearity in your history.