summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2014-02-09 11:09:55 +0000
committerAndrew Godwin <andrew@aeracode.org>2014-02-09 11:10:21 +0000
commita7e2957110e8cac6ad5bf233ce4cc1fa528ac0e0 (patch)
tree2979cb74cf64433c62086d9214baaf02c769e5c7 /django
parenta5391db76a20c8bb35a7bc0192870fddf747c54c (diff)
Fixed #21917: Overly cautious SQLite3 backend for null fields + defaults
Diffstat (limited to 'django')
-rw-r--r--django/db/backends/sqlite3/schema.py5
1 files changed, 0 insertions, 5 deletions
diff --git a/django/db/backends/sqlite3/schema.py b/django/db/backends/sqlite3/schema.py
index cd80d457c6..b6680e730d 100644
--- a/django/db/backends/sqlite3/schema.py
+++ b/django/db/backends/sqlite3/schema.py
@@ -88,11 +88,6 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
# Special-case implicit M2M tables
if isinstance(field, ManyToManyField) and field.rel.through._meta.auto_created:
return self.create_model(field.rel.through)
- # Detect bad field combinations
- if (not field.null and
- (not field.has_default() or field.get_default() is None) and
- not field.empty_strings_allowed):
- raise ValueError("You cannot add a null=False column without a default value on SQLite.")
self._remake_table(model, create_fields=[field])
def remove_field(self, model, field):