summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorClifford Gama <cliffygamy@gmail.com>2025-05-16 23:48:38 +0200
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2025-06-18 08:36:49 +0200
commit74b31cd26b9ad4ad85f131850a734f02aae988bb (patch)
treeceabf0b4c985ae8159d44cf969e17c31bd38a337 /docs
parent8c56e939750ae785b806dfa4e043590760c90ab6 (diff)
Fixed #32770 -- Added system check to ensure django.contrib.postgres is installed when using its features.
Added postgres.E005 to validate 'django.contrib.postgres' is in INSTALLED_APPS when using: * PostgreSQL-specific fields (ArrayField, HStoreField, range fields, SearchVectorField), * PostgreSQL indexes (PostgresIndex and all subclasses), and * ExclusionConstraint The check provides immediate feedback during system checks rather than failing later with obscure runtime and database errors. Thanks to Simon Charette and Sarah Boyce for reviews.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/checks.txt4
-rw-r--r--docs/releases/6.0.txt4
2 files changed, 6 insertions, 2 deletions
diff --git a/docs/ref/checks.txt b/docs/ref/checks.txt
index 699a3d34c0..b9cb1d19cf 100644
--- a/docs/ref/checks.txt
+++ b/docs/ref/checks.txt
@@ -912,7 +912,7 @@ The following checks are performed when a model contains a
------------
The following checks are performed on :mod:`django.contrib.postgres` model
-fields:
+fields, indexes, and constraints:
* **postgres.E001**: Base field for array has errors: ...
* **postgres.E002**: Base field for array cannot be a related field.
@@ -920,6 +920,8 @@ fields:
instance so that it's not shared between all field instances. *This check was
changed to* ``fields.E010`` *in Django 3.1*.
* **postgres.W004**: Base field for array has warnings: ...
+* **postgres.E005**: ``'django.contrib.postgres'`` must be in
+ ``INSTALLED_APPS`` in order to use ``<django.contrib.postgres feature>``.
.. _sites-system-checks:
diff --git a/docs/releases/6.0.txt b/docs/releases/6.0.txt
index 118ad43cc9..362ea70ea0 100644
--- a/docs/releases/6.0.txt
+++ b/docs/releases/6.0.txt
@@ -84,7 +84,9 @@ Minor features
:mod:`django.contrib.postgres`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-* ...
+* Model fields, indexes, and constraints from :mod:`django.contrib.postgres`
+ now include system checks to verify that ``django.contrib.postgres`` is an
+ installed app.
:mod:`django.contrib.redirects`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~