djangodjango-southdjango-appsdjango-syncdb

Do I need to call syncdb before or after South migrate


I'm new to South so I am wondering if I ever need to call

./manage.py syncdb

or doing

./manage.py schemamigration appname --auto
./manage.py migrate appname

is sufficient in all cases South can handle on its own.


Solution

  • South isn't project wide. It is app wide.
    Some apps use south, some apps don't use it.

    if an app is integrated south, to do db changes you will use

    ./manage.py schemamigration appname --auto
    ./manage.py migrate appname
    

    but not all apps are integrated with south.

    When you add a new app that don't use south to your project, you need to call ./manage.py syncdb for these apps. (For example, django.contrib apps)

    In short, use ./manage.py syncdb when an app doesn't use south, and ./manage.py migrate for south integrated apps.