diff -r 480187dd66b3 -r 88577b10b31e schemas/base.py --- a/schemas/base.py Thu Feb 13 16:37:40 2014 +0100 +++ b/schemas/base.py Wed Feb 25 10:33:41 2015 +0100 @@ -23,7 +23,7 @@ from yams.buildobjs import (EntityType, RelationType, RelationDefinition, SubjectRelation, String, TZDatetime, Datetime, Password, Interval, - Boolean) + Boolean, UniqueConstraint) from cubicweb.schema import ( RQLConstraint, WorkflowableEntityType, ERQLExpression, RRQLExpression, PUB_SYSTEM_ENTITY_PERMS, PUB_SYSTEM_REL_PERMS, PUB_SYSTEM_ATTR_PERMS) @@ -164,6 +164,7 @@ cardinality = '11' subject = '*' object = 'String' + constraints = [UniqueConstraint()] # XXX find a better relation name @@ -183,7 +184,6 @@ cardinality = '?*' - class ExternalUri(EntityType): """a URI representing an object in external data store""" uri = String(required=True, unique=True, maxsize=256,