#23920 closed Bug (fixed)
MySQL: migrate TextField() to TextField(blank=True) fails
Reported by: | Waldemar Kornewald | Owned by: | Tim Graham |
---|---|---|---|
Component: | Migrations | Version: | 1.7 |
Severity: | Release blocker | Keywords: | |
Cc: | info+coding@… | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When adding blank=True to an existing TextField and running manage.py makemigrations and manage.py migrate with MySQL I get the following error:
BLOB/TEXT column 'sometextfield' can't have a default value
BTW, why do changes to blank require new migrations?
Change History (7)
comment:1 Changed 9 years ago by
Type: | Uncategorized → Bug |
---|
comment:2 Changed 9 years ago by
Severity: | Normal → Release blocker |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:3 Changed 9 years ago by
Owner: | changed from nobody to Tim Graham |
---|---|
Status: | new → assigned |
comment:5 Changed 9 years ago by
Cc: | info+coding@… added |
---|---|
Triage Stage: | Accepted → Ready for checkin |
comment:6 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
I could reproduce this.
As for your question, it's answered in the migrations docs.