MySQL: migrate TextField() to TextField(blank=True) fails
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)
| Type: |
Uncategorized → Bug
|
| Severity: |
Normal → Release blocker
|
| Triage Stage: |
Unreviewed → Accepted
|
| Owner: |
changed from nobody to Tim Graham
|
| Status: |
new → assigned
|
| Cc: |
info+coding@… added
|
| Triage Stage: |
Accepted → Ready for checkin
|
| Resolution: |
→ fixed
|
| Status: |
assigned → closed
|
I could reproduce this.
As for your question, it's answered in the migrations docs.