I'm trying to create an empty copy of my Django database using the command
manage.py syncdb --migrate --database=<db_copy_name>
It works fine if the database is a sqlite3 database, but fails for a postgres database.
With postgres the normal Django syncdb creation of tables goes fine, but the migration part fails. One of the apps has a reference to a table in another app and the other app has a reference to a table in the first app, so whichever order I migrate the apps I get a
django.db.utils.DatabaseError: relation "<table_name>" does not exist
I'm running Django 1.4, South 0.7.6, psycopg2 2.4.1, with a postgres 9.1 db. The problem is the same with South 0.8, 0.8.1, and psychopg2 2.5.