server/migractions.py
branchstable
changeset 4950 bca0873c0d6e
parent 4949 f4dce73da26b
child 4951 7dc54e12c606
equal deleted inserted replaced
4949:f4dce73da26b 4950:bca0873c0d6e
   477         if rschema.symmetric:
   477         if rschema.symmetric:
   478             self._synchronized.add((objtype, rschema, subjtype))
   478             self._synchronized.add((objtype, rschema, subjtype))
   479         rdef = rschema.rdef(subjtype, objtype)
   479         rdef = rschema.rdef(subjtype, objtype)
   480         if rdef.infered:
   480         if rdef.infered:
   481             return # don't try to synchronize infered relation defs
   481             return # don't try to synchronize infered relation defs
       
   482         repordef = reporschema.rdef(subjtype, objtype)
   482         confirm = self.verbosity >= 2
   483         confirm = self.verbosity >= 2
   483         if syncprops:
   484         if syncprops:
   484             # properties
   485             # properties
   485             self.rqlexecall(ss.updaterdef2rql(rschema, subjtype, objtype),
   486             self.rqlexecall(ss.updaterdef2rql(rschema, subjtype, objtype),
   486                             ask_confirm=confirm)
   487                             ask_confirm=confirm)
   487             # constraints
   488             # constraints
   488             repordef = reporschema.rdef(subjtype, objtype)
       
   489             newconstraints = list(rdef.constraints)
   489             newconstraints = list(rdef.constraints)
   490             # 1. remove old constraints and update constraints of the same type
   490             # 1. remove old constraints and update constraints of the same type
   491             # NOTE: don't use rschema.constraint_by_type because it may be
   491             # NOTE: don't use rschema.constraint_by_type because it may be
   492             #       out of sync with newconstraints when multiple
   492             #       out of sync with newconstraints when multiple
   493             #       constraints of the same type are used
   493             #       constraints of the same type are used