mirror of
https://github.com/django/django.git
synced 2025-06-02 10:09:12 +00:00
[5.0.x] Doc'd that RemoveField also drops related database objects in PostgreSQL.
Backport of f0d50a937910571fc4adb7e6fb91045cdc215aa8 from main
This commit is contained in:
parent
9d79714e25
commit
d36ecbd530
@ -197,6 +197,16 @@ if the field is nullable or if it has a default value that can be used to
|
|||||||
populate the recreated column. If the field is not nullable and does not have a
|
populate the recreated column. If the field is not nullable and does not have a
|
||||||
default value, the operation is irreversible.
|
default value, the operation is irreversible.
|
||||||
|
|
||||||
|
.. admonition:: PostgreSQL
|
||||||
|
|
||||||
|
``RemoveField`` will also delete any additional database objects that are
|
||||||
|
related to the removed field (like views, for example). This is because the
|
||||||
|
resulting ``DROP COLUMN`` statement will include the ``CASCADE`` clause to
|
||||||
|
ensure `dependent objects outside the table are also dropped`_.
|
||||||
|
|
||||||
|
.. _dependent objects outside the table are also dropped: https://www.postgresql.org/docs/current/sql-altertable.html#SQL-ALTERTABLE-PARMS-CASCADE
|
||||||
|
|
||||||
|
|
||||||
``AlterField``
|
``AlterField``
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user