Remove keep_default from add_field

This commit is contained in:
Andrew Godwin 2013-08-11 14:28:55 +01:00
parent d985fd7a18
commit b4c493ecd3
1 changed files with 2 additions and 2 deletions

View File

@ -318,7 +318,7 @@ class BaseDatabaseSchemaEditor(object):
"new_tablespace": self.quote_name(new_db_tablespace), "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. Creates a field on a model.
Usually involves adding a column, but may involve adding a Usually involves adding a column, but may involve adding a
@ -345,7 +345,7 @@ class BaseDatabaseSchemaEditor(object):
self.execute(sql, params) self.execute(sql, params)
# Drop the default if we need to # Drop the default if we need to
# (Django usually does not use in-database defaults) # (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 % { sql = self.sql_alter_column % {
"table": self.quote_name(model._meta.db_table), "table": self.quote_name(model._meta.db_table),
"changes": self.sql_alter_column_no_default % { "changes": self.sql_alter_column_no_default % {