|Version 2 (modified by andrew, 7 years ago) (diff)|
South isn't the only migrations solution around for Django; there are a few others. We address the more modern ones here; remember that we're biased towards South in our opinions, and that one of the alternatives may actually be better for your needs.
django-evolution is unlike South; rather than use a fixed set of migrations, it relies on a combination of simple fixed migrations and automatically-generated migrations which it calculates based on your model changes (e.g. adding fields).
The problems we see in django-evolution (and why South was started, as it was the only one at that time) are:
- The migrations applied to your database aren't fixed in the codebase, but depend on the specific installation. This isn't too much of a problem, but we like predictability and a more concrete list of all the migrations in an app's history.
- Fixed migrations, which are ones in files shipped with the app, are all run when an app is first evolved, even if some are already applied to that codebase.
- There's no provision for complex migratory structures, for example inter-app dependencies.
It does have some advantages:
- You don't need to write as many migrations (but django-evolution can only auto detect model changes, and won't write data migrations for you)
- Setup is a snap, and needs no extra fiddling around (but we don't have too much fiddling, honest)
- It can work out if migrations written in python will apply successfully (but South wraps its migrations in transactions to apply them atomically)
However, if you're only writing a simple app or two, django-evolution may be just what you need.
Very much a newcomer like South, dmigrations is also very similar. Like South, it relies on explicitly written migrations stored in Python files, and knows about gaps in your migration history.
- Real database independence (not only because it only has MySQL support at the time of writing, but because migrations are made using raw SQL, which isn't portable)
- Dependency support for complex-multiple app scenarios
As an advantage, it's even more lightweight than South, so if you don't need those two features you might want to consider it.