Skip to content

Commit 176528c

Browse files
Add a scripting section on modifying db graph
Already had to reference this a couple times in chat
1 parent 7d259f0 commit 176528c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

db-version.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,4 +434,12 @@ DB graphs are scriptable using https://github.com/logseq/nbb-logseq/tree/feat/db
434434

435435
* https://github.com/logseq/logseq/tree/feat/db/deps/db/script - Scripts to query, validate and create any graph
436436
* https://github.com/logseq/logseq/blob/feat/db/deps/outliner/script/transact.cljs - Script to transact (modify) nodes queried from the commandline
437-
* https://github.com/logseq/logseq/tree/feat/db/scripts/src/logseq/tasks/db_graph - More complex scripts to generate graphs with all property types or with schema.org's ontology. See [this readme](https://github.com/logseq/logseq/tree/feat/db/scripts#nbb-scripts) for using these.
437+
* https://github.com/logseq/logseq/tree/feat/db/scripts/src/logseq/tasks/db_graph - More complex scripts to generate graphs with all property types or with schema.org's ontology. See [this readme](https://github.com/logseq/logseq/tree/feat/db/scripts#nbb-scripts) for using these.
438+
439+
### Modify a DB Graph
440+
441+
On desktop, it is easy to modify an existing DB graph with a script and see the change in Logseq. To do so:
442+
443+
1. Press Cmd-S to persist a graph to `~/logseq/graphs/GRAPH-NAME/db.sqlite`.
444+
2. Modify the db.sqlite with a nbb-logseq script.
445+
3. Update the app to use the modified db.sqlite by using the `Replace graph with its db.sqlite file` dev command.

0 commit comments

Comments
 (0)