anchor.diff:    History = [NewRev, RevId],
     Deleted = false,
     {ok, DocId, _RevId3} = barrel_local:put_rev(<<"testdb">>, Doc4, History, Deleted, []),
  -  {ok, Doc5, _} = barrel_local:get(<<"testdb">>, DocId, [{history, true}]),
  -  Revisions = barrel_doc:parse_revisions(Doc5),
  -  Revisions == [RevId2, RevId].
  +  {ok, _Doc5, Meta} = barrel_local:get(<<"testdb">>, DocId, [{history, true}]),
  +  Revisions = [RevId2, RevId],
  +  Revisions = barrel_doc:parse_revisions(Meta).
  +  
   
   
   fold_by_id(_Config) ->
  
positive.code: basic_op(_Config) ->
    {error, not_found} = barrel_local:get(<<"testdb">>, <<"a">>, []),
    Doc = #{ <<"id">> => <<"a">>, <<"v">> => 1},
    {ok, <<"a">>, RevId} = barrel_local:put(<<"testdb">>, Doc, []),
    {ok, Doc, #{<<"rev">> := RevId}=Meta} = barrel_local:get(<<"testdb">>, <<"a">>, []),
    false = maps:is_key(<<"deleted">>, Meta),
    {ok, <<"a">>, _RevId2} = barrel_local:delete(<<"testdb">>, <<"a">>, [{rev, RevId}]),
  
negative.code: 
  async_update(_Config) ->
    Doc = #{ <<"id">> => <<"a">>, <<"v">> => 1},
    ok= barrel_local:post(<<"testdb">>, Doc, [{async, true}]),
    timer:sleep(100),
    {ok, #{ <<"id">> := <<"a">>, <<"v">> := 1}, _} = barrel_local:get(<<"testdb">>, <<"a">>, []).
  
  resource_id(_Config) ->
    Doc = #{ <<"id">> => <<"a">>, <<"v">> => 1},
    {ok, <<"a">>, RevId} = barrel_local:post(<<"testdb">>, Doc, []),
    {ok, _, #{ <<"rev">> := RevId, <<"rid">> := Rid}} = barrel_local:get(<<"testdb">>, <<"a">>, [{meta, true}]),
    1 = barrel_db:decode_rid(Rid),
    {ok, <<"a">>, RevId2} = barrel_local:put(<<"testdb">>, Doc, [{rev, RevId}]),
    {ok, _, #{ <<"rev">> := RevId2, <<"rid">> := Rid}} = barrel_local:get(<<"testdb">>, <<"a">>, [{meta, true}]),
    Doc2 = #{ <<"id">> => <<"b">>, <<"v">> => 1},
    {ok, <<"b">>, _} = barrel_local:post(<<"testdb">>, Doc2, []),
    {ok, _, #{ <<"rid">> := Rid2}} = barrel_local:get(<<"testdb">>, <<"b">>, [{meta, true}]),
    2 = barrel_db:decode_rid(Rid2).
  
  