1
0
mirror of https://github.com/django/django.git synced 2025-03-13 10:50:55 +00:00

Moved SQLite DatabaseSchemaEditor.add_field()'s comment to the correct line.

This commit is contained in:
Mariusz Felisiak 2023-05-09 11:39:49 +02:00 committed by GitHub
parent 1586a09b79
commit 59262c294d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -389,11 +389,10 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
# ADD COLUMN. # ADD COLUMN.
field.primary_key field.primary_key
or field.unique or field.unique
or or not field.null
# Fields with default values cannot by handled by ALTER TABLE ADD # Fields with default values cannot by handled by ALTER TABLE ADD
# COLUMN statement because DROP DEFAULT is not supported in # COLUMN statement because DROP DEFAULT is not supported in
# ALTER TABLE. # ALTER TABLE.
not field.null
or self.effective_default(field) is not None or self.effective_default(field) is not None
): ):
self._remake_table(model, create_field=field) self._remake_table(model, create_field=field)