#32925: TextField default text not populate to MySQL data when migrate
-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
GeniusWiki |
Type: Bug | Status: new
Component: Database | Version: 3.2
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
When adding 2 new fields, one is CharField and another is TextField, they
both nullable with default value:
{{{
subject2 = models.CharField(max_length=512, blank=True, null=True,
default="Some text")
body2 = models.TextField(blank=True, null=True, default="Some text")
}}}
After migration in MySQL 8.0.19, for existing data, new CharField column
populate that default "Some text" value. However, TextField is just null.
This inconsistent behaviour is very confusing.
--
Ticket URL: <https://code.djangoproject.com/ticket/32925>
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/053.078b111df2dfbe88dc0c0b339ed29559%40djangoproject.com.