#32206: Incorrect migration generated if field has been renamed when it has verbose_name set --------------------------------+------------------------------------ Reporter: Peter Inglesby | Owner: nobody Type: Bug | Status: new Component: Migrations | Version: 3.1 Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 --------------------------------+------------------------------------
Comment (by Simon Charette): Detection of field renames happens in the auto-detector's `generate_renamed_fields` method https://github.com/django/django/blob/4a412c2e659f9295973434c65b785b03acee7251/django/db/migrations/autodetector.py#L837-L841 I guess it could be adjusted to ignore `verbose_name` when comparing fields like we do with `db_column` by storing `old_field_verbose_name = old_field.verbose_name` and setting `verbose_name=old_field_verbose_name` in the comparison against `field_dec[2]`. -- Ticket URL: <https://code.djangoproject.com/ticket/32206#comment:2> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/065.0cf8c00e9d5e900b46cecb9a925e4881%40djangoproject.com.