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