From fc4bcb35594f379bbe93cf0c1988ebbce4057d60 Mon Sep 17 00:00:00 2001 From: Ahmed Nassar Date: Sat, 14 Mar 2026 17:11:13 +0200 Subject: [6.0.x] Fixed #35786 -- Removed outdated note about database defaults in AddField/AlterField docs. Backport of 23f49c6b408d9b013e959f91c23813a7c0f6ed64 from main --- docs/ref/migration-operations.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'docs/ref') diff --git a/docs/ref/migration-operations.txt b/docs/ref/migration-operations.txt index e636d682c7..13ff02077f 100644 --- a/docs/ref/migration-operations.txt +++ b/docs/ref/migration-operations.txt @@ -165,8 +165,7 @@ value is permanent and should be baked into the project state (``True``), or if it is temporary and just for this migration (``False``) - usually because the migration is adding a non-nullable field to a table and needs a default value to put into existing rows. It does not affect the behavior -of setting defaults in the database directly - Django never sets database -defaults and always applies them in the Django ORM code. +of setting defaults in the database directly. .. warning:: @@ -217,8 +216,7 @@ value is permanent and should be baked into the project state (``True``), or if it is temporary and just for this migration (``False``) - usually because the migration is altering a nullable field to a non-nullable one and needs a default value to put into existing rows. It does not affect the -behavior of setting defaults in the database directly - Django never sets -database defaults and always applies them in the Django ORM code. +behavior of setting defaults in the database directly. Note that not all changes are possible on all databases - for example, you cannot change a text-type field like ``models.TextField()`` into a number-type -- cgit v1.3