Can anyone please explain me the difference between south migrations and django migrations? What advantage/disadvantage one has over another?
You should think of migrations as a version control system for your database schema. makemigrations is responsible for packaging up your model changes into individual migration files - analogous to commits - and migrate is responsible for applying those to your database.
South is a migration tool used with Django. There will be times when you would be adding fields to a model or changing the type of field (eg: Field was an IntegerField and you want to change it to FloatField). In such cases syncdb doesn't help and South comes to your rescue.
Migration is a way of applying changes that we have made to a model, into the database schema. Django creates a migration file inside the migration folder for each model to create the table schema, and each table is mapped to the model of which migration is created.
makemigrations auto generates migration files containing changes that need to be applied to the database, but doesn't actually change anyhting in your database. migrate will make the actual modifications to your database, based on the migration files.
South is a third part django app that added support for migrations before a builtin migration solution was introduced in Django 1.7. Unless you're stuck with a long-dead Django version, there's no reason you should use South at all. FWIW, just checking the south project's page should have answered your question:
South has been deprecated.
From Django 1.7 upwards, migrations are built into the core of Django. If you are running a previous version, you can find the repository on BitBucket.
Feature-wide both are quite similar (which is not a big surprise since the new builtin migration system started it's life as the 2.0 branch of South), except the new system works better, specially when you have to merge two branches each having it's own migrations.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With