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
1 changed files with 1 additions and 2 deletions

View File

@ -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)