-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Fixed #32770 -- Added system check to ensure django.contrib.postgres
in INSTALLED_APPS
when using its features.
#19480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ccac97e
to
66c64f6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for tackling it Clifford, I'm sure this will prevent a lot of head scratching!
Any thoughts about using a single error code for constraints, indexes, and fields?
django.contrib.postgres in
INSTALLED_APPS` when using its features.
django.contrib.postgres in
INSTALLED_APPS` when using its features.django.contrib.postgres
in INSTALLED_APPS
when using its features.
55c31fa
to
5ce1c9c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR @cliff688 ⭐
I have a minor nitpick and something I want your opinion on 👍
…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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! This looks good to me ⭐
Trac ticket number
ticket-32770
Branch description
Provide a concise overview of the issue or rationale behind the proposed changes.
Checklist
main
branch.