Opened 6 years ago

Closed 6 years ago

#30048 closed Bug (duplicate)

Migrations created when verbose_name or help_text is changed

Reported by: Oskar Persson Owned by: nobody
Component: Migrations Version: 2.1
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


A new migration is created whenever verbose_name or help_text is changed even though both of them has nothing to do with the database.

Tested with this initial model

from django.db import models

class Book(models.Model):
    title = models.CharField(max_length=255)

which was later updated to

from django.db import models
from django.utils.translation import ugettext_lazy as _

class Book(models.Model):
    title = models.CharField(_('title'), max_length=255, help_text="Title of the book")

Tested with Django 1.11.16 (Python 3.6.6) and 2.1.4 (Python 3.7.0)

Change History (1)

comment:1 by Carlton Gibson, 6 years ago

Component: UncategorizedMigrations
Resolution: duplicate
Status: newclosed
Type: UncategorizedBug

This is essentially a Duplicate of #21498, on which there's some noise but, for which the underlying response was wontfix.

Relevant comments from Andrew Godwin:

I'd rather we included every single field - white/blacklisting fields is dangerous. What if a field subclass redefines help_text? What if it uses it to help populate ORM objects?...
comment 6

... changing help_text unfortunately has to [trip the autodetector] (we just can't guarantee it's not useful at database or field runtime).
comment 9

Note: See TracTickets for help on using tickets.
Back to Top