summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2012-09-24 12:52:43 +0100
committerAndrew Godwin <andrew@aeracode.org>2012-09-24 12:52:43 +0100
commit588b839b26d922f2ddc2bbdd6377367f31e4ab4d (patch)
tree468fca6e0d4b41f1532884c1743ee1ffe7920057
parente3c9742cd462706d4da76fcdd6ede7dd1354ad6c (diff)
Fix NOT NULL sql for MySQL
-rw-r--r--django/db/backends/mysql/schema.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/backends/mysql/schema.py b/django/db/backends/mysql/schema.py
index 08e883d80c..dc74b2db2a 100644
--- a/django/db/backends/mysql/schema.py
+++ b/django/db/backends/mysql/schema.py
@@ -6,7 +6,7 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
sql_rename_table = "RENAME TABLE %(old_table)s TO %(new_table)s"
sql_alter_column_null = "MODIFY %(column)s %(type)s NULL"
- sql_alter_column_not_null = "MODIFY %(column)s %(type)s NULL"
+ sql_alter_column_not_null = "MODIFY %(column)s %(type)s NOT NULL"
sql_alter_column_type = "MODIFY %(column)s %(type)s"
sql_rename_column = "ALTER TABLE %(table)s CHANGE %(old_column)s %(new_column)s %(type)s"