Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix NOT NULL sql for MySQL

  • Loading branch information...
commit 588b839b26d922f2ddc2bbdd6377367f31e4ab4d 1 parent e3c9742
@andrewgodwin andrewgodwin authored
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"
Please sign in to comment.
Something went wrong with that request. Please try again.