Permalink
Browse files

Fix NOT NULL sql for MySQL

  • Loading branch information...
1 parent e3c9742 commit 588b839b26d922f2ddc2bbdd6377367f31e4ab4d @andrewgodwin andrewgodwin committed Sep 24, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/db/backends/mysql/schema.py
View
2 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"

0 comments on commit 588b839

Please sign in to comment.