mirror of
https://github.com/logseq/logseq.git
synced 2026-05-27 14:14:24 +00:00
fix: db kv id always resolves to -1
This commit is contained in:
@@ -83,8 +83,8 @@
|
||||
(swap! conns dissoc (datascript-db repo)))
|
||||
|
||||
(defn kv
|
||||
[key value]
|
||||
{:db/id -1
|
||||
[key value & {:keys [id]}]
|
||||
{:db/id (or id -1)
|
||||
:db/ident key
|
||||
key value})
|
||||
|
||||
|
||||
@@ -536,7 +536,7 @@
|
||||
_ (state/add-repo! {:url full-graph-name})
|
||||
_ (route-handler/redirect-to-home!)
|
||||
_ (db/transact! full-graph-name [(react/kv :db/type "db")
|
||||
(react/kv :schema/version db-schema/version)])
|
||||
(react/kv :schema/version db-schema/version {:id -2})])
|
||||
initial-data (sqlite-create-graph/build-db-initial-data config/config-default-content)
|
||||
_ (db/transact! full-graph-name initial-data)
|
||||
_ (repo-config-handler/set-repo-config-state! full-graph-name config/config-default-content)
|
||||
|
||||
Reference in New Issue
Block a user