27👍
✅
Ken Cochrane’s answer to the StackOverflow question How Come My South Migrations Doesn’t Work for Django held the key.
For a new Django project and app, I had to perform the following steps:
- Add South to
INSTALLED_APPS
insettings.py
, but do not add your apps - Run
syncdb
to add the Django and South tables to the database. South modifiessyncdb
, so it’s important to have South in yourINSTALLED_APPS
. - Add apps to
INSTALLED_APPS
insettings.py
- Run
python manage.py schemamigration app_name --initial
for each app - Run
python manage.py migrate app_name
Read the instructions—No, all of the instructions
I was so excited to start using South that I skipped reading the installation documentation. I simply installed South using pip install south
and then just added it to my INSTALLED_APPS
. That was my mistake.
The Configuring Your Django Installation section of the installation documentation states:
Once South is added in, you’ll need to run
./manage.py syncdb
to make the South migration-tracking tables (South doesn’t use migrations for its own models, for various reasons).
Source:stackexchange.com