#32770: GinIndex with OpClass and Cast results in Postgres syntax error in
migration when django.contrib.postgres is not part of INSTALLED_APPS
-------------------------------------+-------------------------------------
Reporter: Seth Yastrov | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 3.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Seth Yastrov):
* status: closed => new
* resolution: worksforme =>
Comment:
Thank you Hannes Ljungberg!
I did not notice that the documentation says to add
`django.contrib.postgres` to `INSTALLED_APPS`. That fixes the problem.
Would it be an idea to make a check that `django.contrib.postgres` is in
`INSTALLED_APPS` when making use of `OpClass` so that instead of
encountering a Postgres syntax error and not knowing what to do (and
assuming there is a bug in Django), you would get a helpful error message
telling how to correct the problem?
Therefore I'm reopening the issue, and hoping that this check can be made,
as despite this requirement being mentioned in the docs, the current
behavior is quite unintuitive.
--
Ticket URL: <https://code.djangoproject.com/ticket/32770#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.c2c8edc9bb53ba8cc400d73804777ce1%40djangoproject.com.