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:
@@ -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 % {
|
||||
|
||||
Reference in New Issue
Block a user