mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #27272 -- Added an on_delete RESTRICT handler to allow cascading deletions while protecting direct ones.
This commit is contained in:
committed by
Mariusz Felisiak
parent
4e1d809aa5
commit
89abecc75d
@@ -199,6 +199,11 @@ Models
|
||||
values under a certain (database-dependent) limit. Values from ``0`` to
|
||||
``9223372036854775807`` are safe in all databases supported by Django.
|
||||
|
||||
* The new :class:`~django.db.models.RESTRICT` option for
|
||||
:attr:`~django.db.models.ForeignKey.on_delete` argument of ``ForeignKey`` and
|
||||
``OneToOneField`` emulates the behavior of the SQL constraint ``ON DELETE
|
||||
RESTRICT``.
|
||||
|
||||
Pagination
|
||||
~~~~~~~~~~
|
||||
|
||||
|
||||
Reference in New Issue
Block a user