diff -r 5b75fd66c80e -r d7a270f50f54 misc/migration/bootstrapmigration_repository.py --- a/misc/migration/bootstrapmigration_repository.py Sun Nov 08 21:53:18 2009 +0100 +++ b/misc/migration/bootstrapmigration_repository.py Fri Nov 20 19:35:54 2009 +0100 @@ -28,6 +28,17 @@ session.set_shared_data('do-not-insert-cwuri', False) if applcubicwebversion < (3, 5, 0) and cubicwebversion >= (3, 5, 0): + # check that migration is not doomed + rset = rql('Any X,Y WHERE X transition_of E, Y transition_of E, ' + 'X name N, Y name N, NOT X identity Y', + ask_confirm=False) + if rset: + from logilab.common.shellutils import ASK + if not ASK.confirm('Migration will fail because of transitions with the same name. ' + 'Continue anyway ?'): + import sys + sys.exit(1) + # proceed with migration add_entity_type('Workflow') add_entity_type('BaseTransition') add_entity_type('WorkflowTransition')