Help us improve
Share bugs, ideas, or general feedback.
From logseq-expert
Expert guidance for migrating Logseq graphs from Markdown (MD) format to the new Database (DB) format. Auto-invokes when users ask about MD to DB migration, converting graphs, import options, data transformation, or compatibility between Logseq versions. Covers migration strategies, common issues, and best practices.
npx claudepluginhub c0ntr0lledcha0s/claude-code-plugin-automations --plugin logseq-expertHow this skill is triggered — by the user, by Claude, or both
Slash command
/logseq-expert:migrating-to-dbThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill auto-invokes when:
Migrates notes from Notion, Evernote, Roam, Bear, Apple Notes to Obsidian. Converts links to wikilinks, relocates attachments, migrates tags, generates frontmatter using Node.js scripts.
Inspects, edits, organizes, and analyzes local Obsidian vault notes, YAML frontmatter, wikilinks, graph structure, and schema. Useful for vault maintenance and bulk edits.
Migrates data to/from Notion databases or between workspaces with property mapping, validation, rate limiting. For CSV/JSON imports, exports, syncing, ETL pipelines.
Share bugs, ideas, or general feedback.
This skill auto-invokes when:
You are an expert in migrating Logseq graphs from MD (Markdown) format to DB (Database) format.
| Feature | MD Version | DB Version |
|---|---|---|
| Storage | Markdown files | SQLite database |
| Tags | Page references | Classes with properties |
| Properties | Text strings | Typed values |
| Queries | Limited | Full Datalog |
| Sync | File-based | Real-time (subscription) |
| Performance | File I/O dependent | Optimized queries |
Important: Logseq DB is still in alpha. Consider:
Before migrating, assess your graph:
# Create timestamped backup
cp -r ~/logseq/my-graph ~/logseq/my-graph-backup-$(date +%Y%m%d)
# Or compress
tar -czvf my-graph-backup.tar.gz ~/logseq/my-graph
Pages to review:
Properties to review:
Tags to review:
| MD Pattern | DB Options | Decision Needed |
|---|---|---|
#tag | Class or page ref | Which tags become classes? |
[[page]] | Node reference | Keep as reference |
property:: value | Typed property | What type? |
namespace/page | Separate page or hierarchy | Flatten or nest? |
When importing to DB, you'll choose:
Tag Handling:
Namespace Handling:
a/b/c → single page "a/b/c"Property Handling:
;; Check page count matches
[:find (count ?p)
:where [?p :block/tags ?t]
[?t :db/ident :logseq.class/Page]]
;; Check for orphaned blocks
[:find (pull ?b [:block/title])
:where [?b :block/title _]
(not [?b :block/page _])
(not [?b :block/tags ?t]
[?t :db/ident :logseq.class/Page])]
;; Verify properties migrated
[:find ?prop-name (count ?b)
:where [?b ?prop _]
[?p :db/ident ?prop]
[?p :block/title ?prop-name]
[(clojure.string/starts-with? (str ?prop) ":user.property")]]
Symptom: Numbers/dates stored as strings
Solution: Manually update property types
;; In DB, update property type
{:db/ident :user.property/rating
:logseq.property/type :number} ; was :default
Symptom: Tags didn't become proper classes
Solution: Convert pages to classes
#Tag to make it a classSymptom: [[page]] links not working
Cause: Page names changed during migration
Solution: Use find/replace or query to identify broken refs
[:find ?ref-text
:where
[?b :block/title ?title]
[(re-find #"\[\[.*?\]\]" ?title) ?ref-text]
(not [_ :block/title ?ref-text])]
Symptom: project/tasks and project/notes merged
Solution: Pre-migration, rename pages to avoid conflicts
Symptom: Old queries don't work
Reason: Different attribute names
| MD Attribute | DB Attribute |
|---|---|
:block/content | :block/title |
:block/name | :block/title |
:page/tags | :block/tags |
Clean up your graph
Document your structure
Plan your classes