# HG changeset patch # User Julien Cristau # Date 1405524055 -7200 # Node ID 5b48dcc02be1404c938a8a82a88fe7c12048c3c0 # Parent 152c09c2f0eded5701acd87ca82d3f839f2de10f [hooks/syncschema] avoid altering a dropped table If the constraint's rdef is being removed, CWConstraintDelOp doesn't need to do anything. Otherwise it may try to alter a removed table/column. Closes #4154549 diff -r 152c09c2f0ed -r 5b48dcc02be1 hooks/syncschema.py --- a/hooks/syncschema.py Thu Jun 12 09:59:55 2014 +0200 +++ b/hooks/syncschema.py Wed Jul 16 17:20:55 2014 +0200 @@ -653,6 +653,9 @@ else: self.critical('constraint %s for rdef %s was missing or already removed', self.oldcstr, rdef) + if cnx.deleted_in_transaction(rdef.eid): + # don't try to alter a table that's going away (or is already gone) + return # then update database: alter the physical schema on size/unique # constraint changes syssource = cnx.repo.system_source