Fix error message for unique constraints

This commit is contained in:
Andrew Godwin 2012-09-24 12:51:50 +01:00
parent 1a6d07783d
commit e3c9742cd4
1 changed files with 1 additions and 1 deletions

View File

@ -384,7 +384,7 @@ class BaseDatabaseSchemaEditor(object):
# Find the unique constraint for this field
constraint_names = self._constraint_names(model, [old_field.column], unique=True)
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),
model._meta.db_table,
old_field.column,