[Django] #23920: MySQL: migrate TextField() to TextField(blank=True) fails

6 views
Skip to first unread message

Django

unread,
Nov 26, 2014, 4:53:13 AM11/26/14
to django-...@googlegroups.com
#23920: MySQL: migrate TextField() to TextField(blank=True) fails
-------------------------------+--------------------
Reporter: wkornewald | Owner: nobody
Type: Uncategorized | Status: new
Component: Migrations | Version: 1.7
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
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?

--
Ticket URL: <https://code.djangoproject.com/ticket/23920>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Nov 27, 2014, 8:31:12 AM11/27/14
to django-...@googlegroups.com
#23920: MySQL: migrate TextField() to TextField(blank=True) fails
----------------------------+--------------------------------------
Reporter: wkornewald | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------------------------
Changes (by wkornewald):

* needs_better_patch: => 0
* type: Uncategorized => Bug
* needs_tests: => 0
* needs_docs: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/23920#comment:1>

Django

unread,
Nov 27, 2014, 9:15:52 AM11/27/14
to django-...@googlegroups.com
#23920: MySQL: migrate TextField() to TextField(blank=True) fails
---------------------------------+------------------------------------
Reporter: wkornewald | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by timgraham):

* severity: Normal => Release blocker
* stage: Unreviewed => Accepted


Comment:

I could reproduce this.

As for your question, it's answered in the
[https://docs.djangoproject.com/en/1.7/topics/migrations/ migrations
docs].

--
Ticket URL: <https://code.djangoproject.com/ticket/23920#comment:2>

Django

unread,
Dec 4, 2014, 9:03:11 AM12/4/14
to django-...@googlegroups.com
#23920: MySQL: migrate TextField() to TextField(blank=True) fails
---------------------------------+-------------------------------------
Reporter: wkornewald | Owner: timgraham
Type: Bug | Status: assigned
Component: Migrations | Version: 1.7

Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+-------------------------------------
Changes (by timgraham):

* status: new => assigned
* owner: nobody => timgraham


--
Ticket URL: <https://code.djangoproject.com/ticket/23920#comment:3>

Django

unread,
Dec 4, 2014, 9:12:51 AM12/4/14
to django-...@googlegroups.com
#23920: MySQL: migrate TextField() to TextField(blank=True) fails
---------------------------------+-------------------------------------
Reporter: wkornewald | Owner: timgraham
Type: Bug | Status: assigned
Component: Migrations | Version: 1.7

Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+-------------------------------------
Changes (by timgraham):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/3683 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/23920#comment:4>

Django

unread,
Dec 4, 2014, 10:02:58 AM12/4/14
to django-...@googlegroups.com
#23920: MySQL: migrate TextField() to TextField(blank=True) fails
-------------------------------------+-------------------------------------

Reporter: wkornewald | Owner: timgraham
Type: Bug | Status: assigned
Component: Migrations | Version: 1.7
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Ready for
Has patch: 1 | checkin
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by MarkusH):

* cc: info+coding@… (added)
* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/23920#comment:5>

Django

unread,
Dec 4, 2014, 10:59:07 AM12/4/14
to django-...@googlegroups.com
#23920: MySQL: migrate TextField() to TextField(blank=True) fails
-------------------------------------+-------------------------------------
Reporter: wkornewald | Owner: timgraham
Type: Bug | Status: closed
Component: Migrations | Version: 1.7
Severity: Release blocker | Resolution: fixed

Keywords: | Triage Stage: Ready for
Has patch: 1 | checkin
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"765fa36d57d08d0568438f6fd74521e7a56abb61"]:
{{{
#!CommitTicketReference repository=""
revision="765fa36d57d08d0568438f6fd74521e7a56abb61"
Fixed #23920 -- Fixed MySQL crash when adding blank=True to TextField.

Thanks wkornewald for the report and Markus Holtermann for review.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23920#comment:6>

Django

unread,
Dec 4, 2014, 10:59:29 AM12/4/14
to django-...@googlegroups.com
#23920: MySQL: migrate TextField() to TextField(blank=True) fails
-------------------------------------+-------------------------------------
Reporter: wkornewald | Owner: timgraham
Type: Bug | Status: closed
Component: Migrations | Version: 1.7

Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
Has patch: 1 | checkin
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"d57124433f0d0f2bf61ea4e14962f3b663ab20c7"]:
{{{
#!CommitTicketReference repository=""
revision="d57124433f0d0f2bf61ea4e14962f3b663ab20c7"
[1.7.x] Fixed #23920 -- Fixed MySQL crash when adding blank=True to
TextField.

Thanks wkornewald for the report and Markus Holtermann for review.

Backport of 765fa36d57d08d0568438f6fd74521e7a56abb61 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23920#comment:7>

Reply all
Reply to author
Forward
0 new messages