mirror of
https://github.com/org-roam/org-roam
synced 2025-08-01 12:17:21 -05:00
(fix)migration: upgrade db to v2 before conversion (#1666)
`org-roam-migrate-v1-to-v2` requires the v2 db to already be in place, so run `org-roam-db-sync` once first. Fixes #1664
This commit is contained in:
@ -88,10 +88,14 @@ This will take a while. Are you sure you want to do this?")
|
|||||||
(message "Backing up files to %s" backup-dir)
|
(message "Backing up files to %s" backup-dir)
|
||||||
(copy-directory org-roam-directory backup-dir))
|
(copy-directory org-roam-directory backup-dir))
|
||||||
|
|
||||||
|
;; Upgrade database to v2
|
||||||
|
(org-roam-db-sync 'force)
|
||||||
|
|
||||||
;; Convert v1 to v2
|
;; Convert v1 to v2
|
||||||
(dolist (f (org-roam--list-all-files))
|
(dolist (f (org-roam--list-all-files))
|
||||||
(org-roam-with-file f nil
|
(org-roam-with-file f nil
|
||||||
(org-roam-migrate-v1-to-v2)))
|
(org-roam-migrate-v1-to-v2)))
|
||||||
|
|
||||||
;; Rebuild cache
|
;; Rebuild cache
|
||||||
(org-roam-db-sync 'force)
|
(org-roam-db-sync 'force)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user