Problems installing South with Django (south_migrationhistory tables do not get created) Problems installing South with Django (south_migrationhistory tables do not get created) django django

Problems installing South with Django (south_migrationhistory tables do not get created)


It seems to me like a bug in South.

Also this may be cause by doing wrong thigs like: running schemamigration --auto south and etc. My suggestion would be install it by running python setup.py install or through easy_install or pip

South documentation says: "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)."

But your output says that south skipped making tables for its own models because it thought south app used migrations

As a workaround you could use

python manage.py syncdb --all

Which causes all tables regardless of migrations to be synchronized and

python manage.py migrate --fake 

to fake migrations.


For a new app, with no existing tables the steps to adding south are this:

  1. add 'south', to the list of INSTALLED_APPS.

  2. make sure the app you need to migrate is also in INSTALLED_APPS.

  3. run ./manage.py syncdb (or python manage.py syncdb from inside your project directory). This adds the migration tables to the database.

  4. from the command line, perform ./manage.py schemamigration yourappname --initial

  5. run ./manage.py migrate yourappname

Based on the error you're giving, it sounds like after step 1 & 2 you forgot to run syncdb to create the migration tables, and the South app isn't finding the place it wants to store schema migrations.


I ran into this same issue. Turns out, by some magics, I had created migrations inside of hte south app.

Discovered by:

~ $ # cd to python library~ $ cd `python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"`python2.7/site-packages $ cd southpython2.7/site-packages/south $ ls migrations   0001_initial.py  0002_initial.py 0003_initial.py __init__.py

These are bad, should not be there, and is what triggers south to skip itself.Removed all things south, reinstalled, then syncdb once again worked.

python2.7/site-packages $ rm -rf south* South*~ $ pip install south