mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[1.7.x] Fixed #23987 -- Made SQLite SchemaEditor always use effective_default().
Backport of 089047331d from master
This commit is contained in:
committed by
Tim Graham
parent
eb632bfba5
commit
1690b92b0d
@@ -69,8 +69,8 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
|
||||
# Add in any created fields
|
||||
for field in create_fields:
|
||||
body[field.name] = field
|
||||
# If there's a default, insert it into the copy map
|
||||
if field.has_default():
|
||||
# Choose a default and insert it into the copy map
|
||||
if not isinstance(field, ManyToManyField):
|
||||
mapping[field.column] = self.quote_value(
|
||||
self.effective_default(field)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user