1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[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 765fa36d57 from master
This commit is contained in:
Tim Graham
2014-12-04 09:11:30 -05:00
parent e8c88c93ec
commit d57124433f
4 changed files with 23 additions and 3 deletions

View File

@@ -560,7 +560,7 @@ class BaseDatabaseSchemaEditor(object):
# Default change?
old_default = self.effective_default(old_field)
new_default = self.effective_default(new_field)
if old_default != new_default:
if old_default != new_default and not self.skip_default(new_field):
if new_default is None:
actions.append((
self.sql_alter_column_no_default % {