#36808: Make UniqueConstraint name required in signature
-------------------------------------+-------------------------------------
Reporter: Jonathan | Owner: Jonathan Biemond
Biemond |
Type: | Status: assigned
Cleanup/optimization |
Component: Database | Version: 6.0
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
A `UniqueConstraint` requires a `name` argument, but is declared optional
(`=None`) in its signature. If `name` is omitted a `ValueError` is raised.
This may be confusing to developers.
The `name` argument was first made optional in the signature in commit
[3aa545281], which introduced support for functional unique constraints,
addressing ticket #30016.
More discussion on the forum:
https://forum.djangoproject.com/t/make-
uniqueconstraint-name-required-in-signature/43664
--
Ticket URL: <
https://code.djangoproject.com/ticket/36808>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.