Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I cannot seem to get this working.

I need South to do migrations for a bunch of apps.

  1. Downloaded south 0.7.3
  2. Unzipped, ran setup.py develop (as it says in the turorial)
  3. Double checked to see if it south is where it should be by going to python interpreter and doing (no errors)

    import south

  4. I do

C:\Users\j\iMiCode\imi_admin>python ./manage.py syncdb

Syncing... No fixtures found.

Synced:
 > django.contrib.auth
 > django.contrib.contenttypes
 > django.contrib.sessions
 > django.contrib.sites
 > django.contrib.messages
 > django.contrib.admin

Not synced (use migrations): 
 - south (use ./manage.py migrate to migrate these)

-At this point from what I understand south should have been synced correct? Anything else I do after this, complains that I have no south_migrationhistory tables in the database.

PS. I am working with Django 1.2.7, python 2.6, on Windows7

like image 757
StanM Avatar asked Mar 09 '12 00:03

StanM


1 Answers

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.

like image 184
Marius Grigaitis Avatar answered Oct 11 '22 08:10

Marius Grigaitis