[hooks/syncschema] do not crash on DROP of an already dropped index/... (closes #2465393)
--- a/hooks/syncschema.py Thu Aug 23 11:43:43 2012 +0200
+++ b/hooks/syncschema.py Fri Aug 31 13:19:39 2012 +0200
@@ -755,7 +755,13 @@
cols = ['%s%s' % (prefix, c) for c in self.cols]
sqls = dbhelper.sqls_drop_multicol_unique_index(table, cols)
for sql in sqls:
- session.system_sql(sql)
+ try:
+ session.system_sql(sql)
+ except Exception: # should be ProgrammingError
+ if sql.startswith('DROP'):
+ self.critical('execute of `%s` failed', sql)
+ continue
+ raise
# XXX revertprecommit_event