diff --git a/deps/db/src/logseq/db/frontend/property.cljs b/deps/db/src/logseq/db/frontend/property.cljs index b8a9eb2684e..f0621709c25 100644 --- a/deps/db/src/logseq/db/frontend/property.cljs +++ b/deps/db/src/logseq/db/frontend/property.cljs @@ -422,21 +422,6 @@ {:type :map :hide? false ; TODO: show for debug now, hide it later :public? false}} - :logseq.user/name {:title "User Name" - :schema - {:type :string - :hide? false - :public? true}} - :logseq.user/email {:title "User Email" - :schema - {:type :string - :hide? false - :public? true}} - :logseq.user/avatar {:title "User Avatar" - :schema - {:type :string - :hide? false - :public? true}} :logseq.property.user/name {:title "User Name" :schema {:type :string @@ -499,7 +484,7 @@ ;; attribute ns is for db attributes that don't start with :block "logseq.property.attribute" "logseq.property.journal" "logseq.property.class" "logseq.property.view" - "logseq.user"}) + "logseq.property.user"}) (defn logseq-property? "Determines if keyword is a logseq property" diff --git a/src/main/frontend/worker/db/migrate.cljs b/src/main/frontend/worker/db/migrate.cljs index 2819317f7b4..a52561f83be 100644 --- a/src/main/frontend/worker/db/migrate.cljs +++ b/src/main/frontend/worker/db/migrate.cljs @@ -427,10 +427,14 @@ [?b :logseq.user/email] [?b :logseq.user/avatar])] db)] - (mapcat (fn [e] [[:db/retract e :logseq.user/name] - [:db/retract e :logseq.user/email] - [:db/retract e :logseq.user/avatar]]) - db-ids))))) + (into + [[:db/retractEntity :logseq.user/name] + [:db/retractEntity :logseq.user/email] + [:db/retractEntity :logseq.user/avatar]] + (mapcat (fn [e] [[:db/retract e :logseq.user/name] + [:db/retract e :logseq.user/email] + [:db/retract e :logseq.user/avatar]]) + db-ids)))))) (def schema-version->updates "A vec of tuples defining datascript migrations. Each tuple consists of the @@ -510,7 +514,7 @@ [47 {:fix replace-hidden-type-with-schema}] [48 {:properties [:logseq.property/default-value :logseq.property/scalar-default-value]}] [49 {:fix replace-special-id-ref-with-id-ref}] - [50 {:properties [:logseq.user/name :logseq.user/email :logseq.user/avatar]}] + [50 {:properties [:logseq.property.user/name :logseq.property.user/email :logseq.property.user/avatar]}] [51 {:properties [:logseq.property.user/name :logseq.property.user/email :logseq.property.user/avatar] :fix deprecate-logseq-user-ns}]])