From 588b839b26d922f2ddc2bbdd6377367f31e4ab4d Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Mon, 24 Sep 2012 12:52:43 +0100 Subject: [PATCH] Fix NOT NULL sql for MySQL --- django/db/backends/mysql/schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"