#35877: Documentation on "Changing a ManyToManyField to use a through model"
does
not respect database index
--------------------------------------+------------------------------------
Reporter: robwa | Owner: (none)
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Sarah Boyce):
* cc: Adam Johnson, Mariusz Felisiak (added)
* stage: Unreviewed => Accepted
* type: Bug => Cleanup/optimization
* version: => dev
Comment:
This was added as part of a9ee6872bd9e1bacc2da827dbd5b9093f724e4a5 to give
a solid example of using `SeparateDatabaseAndState`
That being said, I'm not against us adding an index and so accepting (I
think it should be a `UniqueConstraint` as we recommend folks don't use
`unique_together` anymore).
I will cc some folks who were involved in this section in the docs and see
what they think also
{{{
// ...
options={
"constraints": [
models.UniqueConstraint(
fields=["author", "book"],
name="unique_author_book",
)
]
},
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35877#comment:1>
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 visit
https://groups.google.com/d/msgid/django-updates/01070192dd6a8154-fd136e5c-f357-4e19-8a5b-90dc0dcb5adc-000000%40eu-central-1.amazonses.com.