mirror of
https://github.com/urbit/shrub.git
synced 2024-12-25 21:12:56 +03:00
graph-store: update indices in post on migrate
This commit is contained in:
parent
c0bb44175d
commit
5f0855d278
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user