diff options
| author | petr.prikryl <petr.prikryl@olc.cz> | 2024-05-29 11:22:32 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2025-03-09 11:50:17 +0100 |
| commit | 2a5aca38bbb37f6e7590ac6e68912bfbefb17dae (patch) | |
| tree | 90a43c8c894cd622b8ddbf4c3ac1f49db997b465 /docs | |
| parent | de1117ea8eabe0ee0aa048e5a4e249eab7c4245e (diff) | |
Fixed #35487 -- Removed CASCADE from RemoveField() on PostgreSQL.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Co-authored-by: Adam Johnson <me@adamj.eu>
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/migration-operations.txt | 13 | ||||
| -rw-r--r-- | docs/releases/6.0.txt | 3 |
2 files changed, 8 insertions, 8 deletions
diff --git a/docs/ref/migration-operations.txt b/docs/ref/migration-operations.txt index 8379221df5..26c0c14218 100644 --- a/docs/ref/migration-operations.txt +++ b/docs/ref/migration-operations.txt @@ -195,15 +195,12 @@ 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 +.. versionchanged:: 6.0 + :class:`~django.db.backends.base.schema.BaseDatabaseSchemaEditor` and + PostgreSQL backends no longer use ``CASCADE`` to delete dependent related + database objects, such as views. Any dependent objects that are not managed + by Django may need to be removed manually before running ``RemoveField``. ``AlterField`` -------------- diff --git a/docs/releases/6.0.txt b/docs/releases/6.0.txt index 44b9781d44..a5679dd63c 100644 --- a/docs/releases/6.0.txt +++ b/docs/releases/6.0.txt @@ -254,6 +254,9 @@ backends. * ``BaseDatabaseCreation.create_test_db(serialize)`` is deprecated. Use ``serialize_db_to_string()`` instead. +* :class:`~django.db.backends.base.schema.BaseDatabaseSchemaEditor` and + PostgreSQL backends no longer use ``CASCADE`` when dropping a column. + Dropped support for MariaDB 10.5 -------------------------------- |
