I\'m planning to rename several models in an existing Django project where there are many other models that have foreign key relationships to the models I would like to rena
I am using Django version 1.9.4
I have follow the following steps:-
I have just rename the model oldName to NewName
Run python manage.py makemigrations. It will ask you for
Did you rename the appname.oldName model to NewName? [y/N] select Y
Run python manage.py migrate and it will ask you for
The following content types are stale and need to be deleted:
appname | oldName
appname | NewName
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'.
Type 'yes' to continue, or 'no' to cancel: Select No
It rename and migrate all existing data to new named table for me.