anchor.diff:              ok;
           [Org] ->
               Org1 = Org#org{migrated=true, active=false, worker=undefined},
  -            dets:insert(all_orgs, Org1)
  +            ok = dets:insert(all_orgs, Org1),
  +            Org1
       end;
   mark_org(nodes_failed, OrgId) ->
       case dets:lookup(all_orgs, OrgId) of
  
positive.code:             ok;
          [Org] ->
              Org1 = Org#org{active=true, worker=WorkerPid},
              dets:insert(all_orgs, Org1)
      end.
  
  mark_node(complete, Id) ->
      case dets:lookup(all_nodes, Id) of
          [] -> ok;
          [Node] -> dets:insert(all_nodes, Node#node{status = mysql, solr = both})
      end;
  mark_node(solr_clean, Id) ->
      case dets:lookup(all_nodes, Id) of
          [] -> ok;
          [#node{status = mysql, solr = both} = Node] ->
              dets:insert(all_nodes, Node#node{solr = mysql})
      end.
  
  mark_node(error, Id, Why) ->
      case dets:lookup(all_nodes, Id) of
          [] -> ok;
          [Node] -> dets:insert(all_nodes, Node#node{status = {error, Why}})
      end.
  
  find_org_by_worker(Pid) ->
  
negative.code:             EndTime = {stop, os:timestamp()},
              Time = [EndTime|Org#org.time],
              Org1 = Org#org{read_only=false, time = Time},
              ok = dets:insert(all_orgs, Org1),
              Org1
      end;
  mark_org(migrated, OrgId) ->
      case dets:lookup(all_orgs, OrgId) of
  