[migration/3.18] Only commit when we did something
Avoids countless confirmation prompts.
Closes #3438804.
--- a/misc/migration/3.18.0_Any.py Fri Jan 10 18:31:07 2014 +0100
+++ b/misc/migration/3.18.0_Any.py Tue Jan 14 14:02:51 2014 +0100
@@ -80,7 +80,7 @@
sql('DELETE FROM %s_relation WHERE eid_from IN (%s) OR eid_to IN (%s)' % (rschema.type, martians, martians))
with session.deny_all_hooks_but():
rql('SET X %(r)s Y WHERE Y %(r)s X, NOT X %(r)s Y' % {'r': rschema.type})
- commit()
+ commit()
# multi columns unique constraints regeneration