﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
31650	"Mention uniqueness of constraint names in the ""name"" attribute docs."	Hanne Moa	Hasan Ramezani	"When using `unique_together`, Django will create a unique name for you.

What I have seen with inexperienced people using Django 2.2 and newer is that when they use `UniqueConstraint`instead of `unique_together` they build up a name from the fields involved and maybe the word ""unique"". So, when they have two different models with the same fields needing to be in a unique constraint, they end up with the same name, and hence sooner or later an error.

It should be mentioned in the documentation whenever '''*Constraint.name''' is mentioned that the name needs to be unique for the database, and for 3.0 the example should be updated to include `%(app_label)s` or at a minimum `%(class)s`."	Cleanup/optimization	closed	Documentation	3.0	Normal	fixed			Accepted	1	0	0	0	1	0
