mirror of
https://github.com/django/django.git
synced 2025-10-27 23:56:08 +00:00
Adding 'sqlmigrate' command and quote_parameter to support it.
This commit is contained in:
@@ -93,11 +93,4 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
|
||||
return self.normalize_name(for_name + "_" + suffix)
|
||||
|
||||
def prepare_default(self, value):
|
||||
if isinstance(value, (datetime.date, datetime.time, datetime.datetime)):
|
||||
return "'%s'" % value
|
||||
elif isinstance(value, six.string_types):
|
||||
return repr(value)
|
||||
elif isinstance(value, bool):
|
||||
return "1" if value else "0"
|
||||
else:
|
||||
return str(value)
|
||||
return self.connection.ops.quote_parameter(value)
|
||||
|
||||
Reference in New Issue
Block a user