15👍
✅
As mentioned in the comments, this answer is true for very old Django versions
No You do not need a migration.
Related name is the name to use for the relation from the related object back to this one (the reverse relationship).
related_name
has nothing to do with the database. It is consumed by the Django’s ORM to fetch queryset results, so you dont need a migration if you change the related_name
attribute on a models’ field.
Some additional documentation here on the usage of related_name
12👍
The above accepted answer is now outdated.
Django does create and alter field foreign_key_field on model
migration when the related name of a foreign key field changes.
- Django: Check for related objects and whether it contains data
- How to check whether virtualenv was created with '–no-site-packages'?
- Django unable to find MySQLdb python module
- Django collectstatic no such file or directory
Source:stackexchange.com