Skip to content

Commit

Permalink
Remove keep_default from add_field
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewgodwin committed Aug 11, 2013
1 parent d985fd7 commit b4c493e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django/db/backends/schema.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def alter_db_tablespace(self, model, old_db_tablespace, new_db_tablespace):
"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
Expand All @@ -345,7 +345,7 @@ def add_field(self, model, field, keep_default=False):
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 % {
Expand Down

0 comments on commit b4c493e

Please sign in to comment.