diff options
Diffstat (limited to 'django')
-rw-r--r-- | django/db/backends/sqlite3/schema.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/django/db/backends/sqlite3/schema.py b/django/db/backends/sqlite3/schema.py index 095304c095..2ca9a01855 100644 --- a/django/db/backends/sqlite3/schema.py +++ b/django/db/backends/sqlite3/schema.py @@ -389,11 +389,10 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor): # ADD COLUMN. field.primary_key or field.unique - or + or not field.null # Fields with default values cannot by handled by ALTER TABLE ADD # COLUMN statement because DROP DEFAULT is not supported in # ALTER TABLE. - not field.null or self.effective_default(field) is not None ): self._remake_table(model, create_field=field) |