# HG changeset patch # User Sylvain Thénault # Date 1308753267 -7200 # Node ID 465009397d91972416f8eb0646f0c50674a486df # Parent 7f321b7db8daab46f1bba8339e853d3bb49b07aa [migration] don't add CWUniqueConstraint if already there (may occurs when running a migration in multiple times diff -r 7f321b7db8da -r 465009397d91 misc/migration/bootstrapmigration_repository.py --- 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: