From b4c493ecd3b8d0d55347949984561762ad2ef1dc Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Sun, 11 Aug 2013 14:28:55 +0100 Subject: [PATCH] Remove keep_default from add_field --- django/db/backends/schema.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/db/backends/schema.py b/django/db/backends/schema.py index 0a283b7fd8..19a737883f 100644 --- a/django/db/backends/schema.py +++ b/django/db/backends/schema.py @@ -318,7 +318,7 @@ class BaseDatabaseSchemaEditor(object): "new_tablespace": self.quote_name(new_db_tablespace), }) - def add_field(self, model, field, keep_default=False): + def add_field(self, model, field): """ Creates a field on a model. Usually involves adding a column, but may involve adding a @@ -345,7 +345,7 @@ class BaseDatabaseSchemaEditor(object): self.execute(sql, params) # Drop the default if we need to # (Django usually does not use in-database defaults) - if not keep_default and field.default is not None: + if field.default is not None: sql = self.sql_alter_column % { "table": self.quote_name(model._meta.db_table), "changes": self.sql_alter_column_no_default % {