[migration] don't add CWUniqueConstraint if already there (may occurs when running a migration in multiple times
--- a/misc/migration/bootstrapmigration_repository.py Tue Jun 21 15:34:15 2011 +0200
+++ b/misc/migration/bootstrapmigration_repository.py Wed Jun 22 16:34:27 2011 +0200
@@ -1,4 +1,4 @@
-# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of CubicWeb.
@@ -94,7 +94,7 @@
drop_relation_definition('CWRType', '%s_permission' % action, 'RQLExpression')
sync_schema_props_perms('read_permission', syncperms=False) # fix read_permission cardinality
-if applcubicwebversion < (3, 9, 6) and cubicwebversion >= (3, 9, 6):
+if applcubicwebversion < (3, 9, 6) and cubicwebversion >= (3, 9, 6) and not 'CWUniqueTogetherConstraint' in schema:
add_entity_type('CWUniqueTogetherConstraint')
if not ('CWUniqueTogetherConstraint', 'CWRType') in schema['relations'].rdefs: