server/migractions.py
branchstable
changeset 4949 f4dce73da26b
parent 4947 c3ded0287295
child 4950 bca0873c0d6e
equal deleted inserted replaced
4948:5774491a1421 4949:f4dce73da26b
   474         if (subjtype, rschema, objtype) in self._synchronized:
   474         if (subjtype, rschema, objtype) in self._synchronized:
   475             return
   475             return
   476         self._synchronized.add((subjtype, rschema, objtype))
   476         self._synchronized.add((subjtype, rschema, objtype))
   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)
       
   480         if rdef.infered:
       
   481             return # don't try to synchronize infered relation defs
   479         confirm = self.verbosity >= 2
   482         confirm = self.verbosity >= 2
   480         if syncprops:
   483         if syncprops:
   481             # properties
   484             # properties
   482             self.rqlexecall(ss.updaterdef2rql(rschema, subjtype, objtype),
   485             self.rqlexecall(ss.updaterdef2rql(rschema, subjtype, objtype),
   483                             ask_confirm=confirm)
   486                             ask_confirm=confirm)
   484             # constraints
   487             # constraints
   485             rdef = rschema.rdef(subjtype, objtype)
       
   486             repordef = reporschema.rdef(subjtype, objtype)
   488             repordef = reporschema.rdef(subjtype, objtype)
   487             newconstraints = list(rdef.constraints)
   489             newconstraints = list(rdef.constraints)
   488             # 1. remove old constraints and update constraints of the same type
   490             # 1. remove old constraints and update constraints of the same type
   489             # 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
   490             #       out of sync with newconstraints when multiple
   492             #       out of sync with newconstraints when multiple