Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

stale content types while syncdb in Django

While I'm trying to syncdb for my django project, I'm seeing following complains:

The following content types are stale and need to be deleted:

myapp | 

Any objects related to these content types by a foreign key will also
be deleted. Are you sure you want to delete these content types?
If you're unsure, answer 'no'.

While I've also read the similar problem django-syncdb-many-to-many-stale, but I cannot risk myself typing yes since I'm on prod instance.

Would yes safely delete those stale entries in contenttype?

like image 929
yuwang Avatar asked May 23 '13 03:05

yuwang


1 Answers

Normally you can delete them safely, as these are content types where no model exists anymore. The only thing you should be aware of is, that if you had other models pointing to the ContentType model via a ForeignKey these objects will be deleted as well. If you didn't set any foreign keys to ContentType at all nothing bad can happen, if you did evaluate if you would still need the objects that have a foreign key to the content type you are about to delete (if there are any).

like image 103
Bernhard Vallant Avatar answered Sep 21 '22 22:09

Bernhard Vallant