anchor.diff:           code_change/3]).
   
   -define(SERVER, ?MODULE).
  --define(COLLECTION_SERVERS, <<"servers">>).
  +-define(COLLECTION_SERVER, <<"server">>).
   -define(COLLECTION_DEVICE_PERMISSIONS, <<"user_device">>).
   -define(COLLECTION_USERS, <<"users">>).
   -define(COLLECTION_DEVICES, <<"devices">>).
  
positive.code: do_create_server(#state{topology = Topology}, Rec) ->
      Map = to_map(server, Rec),
      Callback = fun(Worker) ->
                         mc_worker_api:insert(Worker, ?COLLECTION_SERVERS, Map)
                 end,
      Item = mongoc:transaction(Topology, Callback),
      do_create_result(Item, server).
  
negative.code: 
  do_get_server(#state{topology = Topology}) ->
      Callback = fun(Conf) ->
                         mongoc:find_one(Conf, ?COLLECTION_SERVER, #{}, #{}, 0)
                 end,
      Item = mongoc:transaction_query(Topology, Callback),
      do_get_result(Item, server).
  