Thursday, October 8, 2015

Re: "RuntimeError: Error creating new content types."

On 1.8 `--fake-initial` only works if you have a single initial migration per app. We don't because we have additional migrations to load data and create database triggers, etc.

In 1.9 this will be handled by the `initial = True setting on the Migration class.

Until then, we are using:

./manage.py migrate --fake-initial contenttypes
./manage.py migrate --fake

Of course this relies on you being certain that your existing database is exactly the same as it would be if all the migrations were applied to an empty database and there is no sanity-checking.

--
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/0110001f-a43e-47b4-8704-2cc0ab7a92f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment