Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#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 by Waldemar Kornewald, 10 years ago

Type: UncategorizedBug

comment:2 by Tim Graham, 10 years ago

Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted

I could reproduce this.

As for your question, it's answered in the migrations docs.

comment:3 by Tim Graham, 10 years ago

Owner: changed from nobody to Tim Graham
Status: newassigned

comment:4 by Tim Graham, 10 years ago

Has patch: set

comment:5 by Markus Holtermann, 10 years ago

Cc: info+coding@… added
Triage Stage: AcceptedReady for checkin

comment:6 by Tim Graham <timograham@…>, 10 years ago

Resolution: fixed
Status: assignedclosed

In 765fa36d57d08d0568438f6fd74521e7a56abb61:

Fixed #23920 -- Fixed MySQL crash when adding blank=True to TextField.

Thanks wkornewald for the report and Markus Holtermann for review.

comment:7 by Tim Graham <timograham@…>, 10 years ago

In 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

Note: See TracTickets for help on using tickets.
Back to Top