Wednesday, October 28, 2015

Re: Test problems after upgrading to 1.8

I removed the table auth_message from my database, I tried to run it once more, and then I got a new similar message, so I removed that table too, and now it works again. I still don't understand why I suddenly got this error, but it's working again, so I'm happy :)

onsdag 28. oktober 2015 09.19.25 UTC+1 skrev o_r følgende:
I've recently upgraded from 1.3 to 1.8. I have a rather large testsuite, and by the end of the upgrade all the tests passed. Now I've added some new models, and made the new migration, and it seemed to work as expected, but when I try to run my tests again now, I get an error message like this:

CommandError: Database test_27_10 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 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 "auth_message" references "auth_user".

HINT:  Truncate table "auth_message" at the same time, or use TRUNCATE ... CASCADE.


I used to run south, so as part of the upgrade, I used the --fake option on everything, but later on I removed the migration for contenttypes and auth, and ran the migration again.

Any Ideas of what is wrong and how to fix it? Thanks!

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2d5dd30f-7253-4742-9685-2c60224b6888%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment