Opened 3 years ago
Last modified 3 years ago
#32925 closed Bug
TextField default text not populate to MySQL data when migrate — at Initial Version
Reported by: | Edgenius | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 3.2 |
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 |
Description
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.
Note:
See TracTickets
for help on using tickets.