diff options
| author | David Sanders <shang.xiao.sanders@gmail.com> | 2024-04-17 02:11:06 +1000 |
|---|---|---|
| committer | Natalia <124304+nessita@users.noreply.github.com> | 2024-04-16 13:11:41 -0300 |
| commit | d36ecbd5306f98231c9f9cbfc78136052fde723a (patch) | |
| tree | 30269fcc39ef59c85b5caff646e241f6434ab227 /docs | |
| parent | 9d79714e25911dbc768ba4b71e5f838ee0688edc (diff) | |
[5.0.x] Doc'd that RemoveField also drops related database objects in PostgreSQL.
Backport of f0d50a937910571fc4adb7e6fb91045cdc215aa8 from main
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/migration-operations.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/ref/migration-operations.txt b/docs/ref/migration-operations.txt index 96a8e4bc8c..3272e1a392 100644 --- a/docs/ref/migration-operations.txt +++ b/docs/ref/migration-operations.txt @@ -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 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`` -------------- |
