Commits

Andrew Godwin  committed 245c11e

Add defaults if they're specified, even if column is nullable.

  • Participants
  • Parent commits fa4ea4b

Comments (0)

Files changed (1)

File south/db/generic.py

             # if the field is "NOT NULL" and a default value is provided, create the column with it
             # this allows the addition of a NOT NULL field to a table with existing rows
             if not getattr(field, '_suppress_default', False):
-                if not field.null and not getattr(field, '_suppress_default', False) and field.has_default():
+                if field.has_default():
                     default = field.get_default()
                     # If the default is actually None, don't add a default term
                     if default is not None: