landscape: migration works for chat/groups

This commit is contained in:
Liam Fitzgerald 2022-10-25 13:49:25 +10:00
parent f7e550b1f4
commit 5e89835c5d
2 changed files with 18 additions and 2 deletions

View File

@ -1,10 +1,16 @@
/- met=metadata-store, gra=graph-store
/- *group
|%
+$ flag (pair ship term)
++ chat
|%
+$ import
[writers=(set ship) =association:met =update-log:gra =graph:gra]
+$ flag (pair ship term)
+$ imports (map flag import)
--
++ groups
|%
+$ import [=association:met =group]
+$ imports (map flag import)
--
--

View File

@ -18,10 +18,20 @@
(scry:strandio ,[%6 =network:gra] /gx/graph-store/export/noun)
;< =associations:met bind:m
(scry:strandio ,associations:met /gx/metadata-store/associations/noun)
=/ =imports:groups:i
%- ~(gas by *imports:groups:i)
%+ murn ~(tap by groups)
|= [=flag:i =group]
^- (unit [_flag import:groups:i])
?~ assoc=(~(get by associations) [%groups flag])
~& missing-group-assoc/flag
~
`[flag u.assoc group]
;< ~ bind:m (poke-our:strandio %groups group-import+!>(imports))
=/ =imports:chat:i
%- ~(gas by *imports:chat:i)
%+ murn ~(tap by graphs.network)
|= [=flag:chat:i graph=graph:gra mar=(unit mark)]
|= [=flag:i graph=graph:gra mar=(unit mark)]
?. =(mar `%graph-validator-chat) :: XX: correct detection?
~
?~ assoc=(~(get by associations) [%graph flag])