#30670: Document SchemaEditor.add_constraint()/remove_constraint() methods.
-------------------------------------+-------------------------------------
Reporter: akash1997 | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Documentation | Version: 2.2
Severity: Normal | Resolution:
Keywords: SchemaEditor, | Triage Stage: Accepted
unique_together, constraints |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):
* component: Utilities => Documentation
* stage: Unreviewed => Accepted
* type: New feature => Cleanup/optimization
* easy: 0 => 1
Comment:
`alter_unique_together()` exists for altering
[https://docs.djangoproject.com/en/2.2/ref/models/options/#unique-together
Options.unique_together], i.e. a list of lists that must be unique when
considered together. It doesn't "alter" unique constraints in reality it
will add/remove unique constraints.
`SchemaEditor` supports `add_constraint()` and `remove_constraint()`
operations for
[https://docs.djangoproject.com/en/2.2/ref/models/constraints/
Meta.constraints] manipulation, but it seems that they are
[https://docs.djangoproject.com/en/2.2/ref/schema-editor/ undocumented].
We should document them.
--
Ticket URL: <https://code.djangoproject.com/ticket/30670#comment:2>
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/067.4b7c0ce53f428e87b4ad1799913e299a%40djangoproject.com.