Test fails to run
Hello,
I'm running a test but it fails after syncdb part with the following
message:
Error: Database test_<project_name> couldn't be flushed. Possible
reasons:
* The database isn't running or isn't configured correctly.
* At least one of the expected database tables doesn't exist.
* The SQL was invalid.
Hint: Look at the output of 'django-admin.py sqlflush'. That's the SQL
this command wasn't able to run.
The full error: cannot truncate a table referenced in a foreign key
constraint
DETAIL: Table "<table_name_1>" references "<table_name_2>".
HINT: Truncate table "<table_name_1>" at the same time, or use
TRUNCATE ... CASCADE.
The foreign key is between models in 2 different apps.
Thanks,
Alex
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home