Skip to content

Commit 23f49c6

Browse files
authored
Fixed #35786 -- Removed outdated note about database defaults in AddField/AlterField docs.
1 parent e779bc7 commit 23f49c6

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

docs/ref/migration-operations.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,7 @@ value is permanent and should be baked into the project state (``True``),
165165
or if it is temporary and just for this migration (``False``) - usually
166166
because the migration is adding a non-nullable field to a table and needs
167167
a default value to put into existing rows. It does not affect the behavior
168-
of setting defaults in the database directly - Django never sets database
169-
defaults and always applies them in the Django ORM code.
168+
of setting defaults in the database directly.
170169

171170
.. warning::
172171

@@ -217,8 +216,7 @@ value is permanent and should be baked into the project state (``True``),
217216
or if it is temporary and just for this migration (``False``) - usually
218217
because the migration is altering a nullable field to a non-nullable one and
219218
needs a default value to put into existing rows. It does not affect the
220-
behavior of setting defaults in the database directly - Django never sets
221-
database defaults and always applies them in the Django ORM code.
219+
behavior of setting defaults in the database directly.
222220

223221
Note that not all changes are possible on all databases - for example, you
224222
cannot change a text-type field like ``models.TextField()`` into a number-type

0 commit comments

Comments
 (0)