diff -r 43b4895a150f -r 072429be2d95 hooks/syncschema.py --- a/hooks/syncschema.py Fri Feb 14 17:52:49 2014 +0100 +++ b/hooks/syncschema.py Thu Feb 27 18:10:29 2014 +0100 @@ -676,7 +676,11 @@ rdef = self.rdef # in-place modification of in-memory schema first _set_modifiable_constraints(rdef) - rdef.constraints.remove(self.oldcstr) + if self.oldcstr in rdef.constraints: + rdef.constraints.remove(self.oldcstr) + else: + self.critical('constraint %s for rdef %s was missing or already removed', + self.oldcstr, rdef) # then update database: alter the physical schema on size/unique # constraint changes syssource = session.cnxset.source('system')