views:

302

answers:

2

This problem is basically the same as the previous question here.

However, the answer there does not work for me. I've installed the trunk version of south, manually entered the import line in the migration file in question, and done a full 'startmigration' in a separate directory and examined the 0001_initial.py file.

I have a Django project with several applications in it, one of them (named 'core') being referred to by the others. The south migration is trying to create a new table, with a column that has a foreign key to a model in core.

I'm currently importing core in the migration in question (0006), and I even added it to migration 0001, although it doesn't seem like that should matter.

Before I do something drastic, like removing that field, running the migration, and adding the field manually, is there a known manual workaround for fixing this south issue?

+1  A: 

you probably did not use the --freeze option like this:

python manage.py startmigration appname migrate_core --freeze core

Rasiel
A: 

Having created a migration like so:

./manage.py startmygration appname --model NewModel

This error occurs: "The model 'program' from the app 'core' is not available in this migration."

Recreating the migration like this fixes it:

./managepy startmigration appname --model NewModel --freeze core.Program

Just doing "--freeze core" did not do the trick for me.

ShawnMilo