( jur - nay - sic ) Entrepreneur / Software Engineer

Need A Cheatsheet For Django-South?

One of the greatest things about Django is it’s emphasis on apps and reusability and the community that follows it. My Django projects always have apps in them, and one of my most recent favorites is Django-South. The problem is that South is one of those apps that I often use once when I setup my project and then don’t touch for a while (outsite of migrations updates). So to help myself out–and hopefully others as well–I have composed a table of the commands that I use most often in South

Command Description
./manage.py schemamigration app_name –initial If you have not previously run you app through syncdb use this command to set it up with South.
./manage.py convert_to_south app_name Use you already ran your app through syncdb.
./manage.py migrate app_name –fake Use this if your like me and often use --initial when I should have used the convert_to_south command. This tells South that your database is already setup for the current schema.
./manage.py migrate Migrate the database schema for all the South enabled apps.
./manage.py migrate app_name Migrate only the specified app’s database schema
./manage.py schemamigration app_name –auto Update the schema migration for the app.

These are the commands that you will need the most, but of course South is a very well done app and you should check out the South documentation for more advanced options.

  • mbrochh

    You should add datamigration as well.

Follow Us

Follow our activity on the web and get to know us.