#4070: unique_for_date and friends should create database indexes where possible
-------------------------------------+-------------------------------------
Reporter: sam@… | Owner: nobody
Type: New feature | Status: closed
Component: Database layer | Version: master
(models, ORM) | Resolution: wontfix
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by aaugustin):
* status: new => closed
* resolution: => wontfix
Comment:
Since time zone support was added,
[https://docs.djangoproject.com/en/stable/ref/models/fields/#unique-for-
date the check is performed in the current time zone]. In general, it's
impossible to make a database index change dynamically when the time zone
changes in the application. If you have a more restricted use case, you
can add the index with a migration.
--
Ticket URL: <https://code.djangoproject.com/ticket/4070#comment:7>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/075.f77f420368e8503c1518396eef91306b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.