14th January, 2011

South commands

Quick note for Django South commands:

New app:

manage.py schemamigration app_name --initial
manage.py migrate app_name

Existing app:

First run on your development environment:

manage.py convert_to_south app_name

Then copy the migrations directory to any servers you want to migrate, and run:

manage.py migrate app_name 0001 --fake

Now for any subsequent migrations, on the development environment, run:

manage.py schemamigration app_name --auto
manage.py migrate app_name

Now you can copy your new migration files to the server and run:

manage.py migrate app_name

 

Comments

  1. 17th October 2012 Adam Auckland said
    If this fails complaining that south_migrationhistory does not exist, you forgot to run syncdb after you installed South.

Add Comment

The opinions expressed here are my own and not those of my employer.