Fix error message for unique constraints
This commit is contained in:
parent
1a6d07783d
commit
e3c9742cd4
|
@ -384,7 +384,7 @@ class BaseDatabaseSchemaEditor(object):
|
||||||
# Find the unique constraint for this field
|
# Find the unique constraint for this field
|
||||||
constraint_names = self._constraint_names(model, [old_field.column], unique=True)
|
constraint_names = self._constraint_names(model, [old_field.column], unique=True)
|
||||||
if strict and len(constraint_names) != 1:
|
if strict and len(constraint_names) != 1:
|
||||||
raise ValueError("Found wrong number (%s) of constraints for %s.%s" % (
|
raise ValueError("Found wrong number (%s) of unique constraints for %s.%s" % (
|
||||||
len(constraint_names),
|
len(constraint_names),
|
||||||
model._meta.db_table,
|
model._meta.db_table,
|
||||||
old_field.column,
|
old_field.column,
|
||||||
|
|
Loading…
Reference in New Issue