anchor.diff:  %% Internal Function Definitions
   %% ------------------------------------------------------------------
   
  -write_nodes_to_sql(OrgId, [{#node_cache{}=MetaData, NodeData} | Rest]) ->
  +write_nodes_to_sql(S, OrgId, [{#node_cache{}=MetaData, NodeData} | Rest]) ->
       #node_cache{name = Name, authz_id = AuthzId,
                   id = OrigId,
                   requestor_id = RequestorId} = MetaData,
  
positive.code:     %% this is where we'd call chef_db:create_node(S, Node) shortcut
      %% will be to pass 'ignore' for first arg since not needed for
      %% emysql backed node creation.
      io:format("migrating: ~p ~n", [Node]),
      file:write_file(<<OrgId/binary, "_nodes_complete.txt">>, 
                      iolist_to_binary([Name, <<"\t">>, OrigId, <<"\t">>,
                                        Node#chef_node.id, "\n"]),
                      [append]),
      write_nodes_to_sql(OrgId, Rest);
  write_nodes_to_sql(OrgId, [{error, _NodeData}|Rest]) ->
      %% FIXME: how should we track errors of this sort if they occur?
      %% This is a case where we found node json, but no matching mixlib
      %% or authz data.
      write_nodes_to_sql(OrgId, Rest);
  write_nodes_to_sql(_, []) ->
      ok.
  
  fetch_node_meta_data(S, OrgName, OrgId, Name, Id) ->
  
negative.code:     NodeDocs = chef_otto:bulk_get(S, OrgDb, NodeCouchIds),
      NodeMeta = [ fetch_node_meta_data(S, OrgName, OrgId, Name, Id)
                   || {Name, Id} <- NodeBatch ],
      Ctx = chef_db:make_context(<<"my-req-id-for-mover">>, S),
      write_nodes_to_sql(Ctx, OrgId, lists:zip(NodeMeta, NodeDocs)),
      {next_state, migrate_nodes,
       State#state{node_list = safe_split(BatchSize, NodeList)}, 0}.
  
  