summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2023-05-09 11:39:49 +0200
committerGitHub <noreply@github.com>2023-05-09 11:39:49 +0200
commit59262c294d26d2aa9346284519545c0f988bf353 (patch)
tree9f3d25317c803169fe49ed9b6e4c6d0f38ba3f4b /django
parent1586a09b7949bbb7b0d84cb74ce1cadc25cbb355 (diff)
downloaddjango-59262c294d26d2aa9346284519545c0f988bf353.tar.gz
Moved SQLite DatabaseSchemaEditor.add_field()'s comment to the correct line.
Diffstat (limited to 'django')
-rw-r--r--django/db/backends/sqlite3/schema.py3
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)