[migration] add rollback when replace_eid_sequence_with_eid_numrange fails
If we get here, the current transaction is aborted, so if we are to
assume everything is fine and continue we need to rollback first.
--- a/cubicweb/misc/migration/bootstrapmigration_repository.py Wed Feb 17 14:03:56 2016 +0100
+++ b/cubicweb/misc/migration/bootstrapmigration_repository.py Wed Feb 17 14:01:35 2016 +0100
@@ -45,6 +45,7 @@
cursor.execute(dbh.sql_sequence_current_state('entities_id_seq'))
lasteid = cursor.fetchone()[0]
except: # programming error, already migrated
+ session.rollback()
return
cursor.execute(dbh.sql_drop_sequence('entities_id_seq'))