anchor.diff:    {ok, {LocalIP, LocalPort}} = inet:sockname(Socket),
     Query = "
     with data_id as (
  -    insert into data.connections (protocol, type)
  -      values ($1, 'ip')
  +    insert into data.connections (id, protocol, type)
  +      values ($1, $2, 'ip')
         returning id
     ) insert into connections.ip_data
  -      select D.id, $2, $3, $4, $5
  +      select D.id, $3, $4, $5, $6
           from data_id D returning id",
  -  S = execute(1000, execute, {Query, [Proto, LocalIP, LocalPort, RemoteIP, RemotePort]}, Timeout),
  +  ConnectionId = now2id(),
  +  S = execute(1000, execute, {Query, [ConnectionId, Proto, LocalIP, LocalPort, RemoteIP, RemotePort]}, Timeout),
     debug ("returned ~w", [S]),
     {ok, ConnectionID} = S,
     hooks:set(Pid, connection_id, ConnectionID),
  
positive.code: set(_Pid, replica, answer, {DataIDs, Answer}, Timeout) ->
    ConnectionID = hooks:get(connection_id),
    {ok, AnswerID} = execute(1000, insert, {replica, answers, [
          {data, Answer},
          {connection_id, ConnectionID}
          ]}, Timeout),
  
negative.code:     D   -> {navigation, D}
    end,
    {ok, DataID} = insert_terminal_packet(PacketID, Module, Type, TableName, Data, Timeout),
    debug("packet id is ~w", [DataID]),
    {ok, DataID} = insert_terminal_packet(DataID, Module, Type,
                                          proplists:delete(TableName, Packet), Timeout),
    if
  