graph-store: update indices in post on migrate

This commit is contained in:
Liam Fitzgerald 2020-10-30 10:20:35 +10:00
parent c0bb44175d
commit 5f0855d278

View File

@ -93,7 +93,7 @@
~(tap by nodes) ~(tap by nodes)
|= [=index:store =node:store] |= [=index:store =node:store]
^- [index:store node:store] ^- [index:store node:store]
:- (turn index maybe-unix-to-da) :- (convert-unix-timestamped-index index)
(convert-unix-timestamped-node node) (convert-unix-timestamped-node node)
:: ::
++ remove-nodes ++ remove-nodes
@ -103,7 +103,7 @@
%- ~(gas in *(set index:store)) %- ~(gas in *(set index:store))
%+ turn %+ turn
~(tap in indices) ~(tap in indices)
|=(=index:store (turn index maybe-unix-to-da)) convert-unix-timestamped-index
-- --
:: ::
++ maybe-unix-to-da ++ maybe-unix-to-da
@ -119,9 +119,14 @@
^- node:store ^- node:store
?. ?=(%graph -.children.node) ?. ?=(%graph -.children.node)
node node
:+ post.node %graph :+ post.node(index (convert-unix-timestamped-index index.post.node))
%graph
(convert-unix-timestamped-graph p.children.node) (convert-unix-timestamped-graph p.children.node)
:: ::
++ convert-unix-timestamped-index
|= =index:store
(turn index maybe-unix-to-da)
::
++ convert-unix-timestamped-graph ++ convert-unix-timestamped-graph
|= =graph:store |= =graph:store
%+ gas:orm *graph:store %+ gas:orm *graph:store