File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed
src/main/frontend/worker/db Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 396396 :block/name (common-util/page-name-sanity-lc (:block/title page))})))
397397 pages)))
398398
399- (defn remove-block-path-refs-datoms
399+ (defn remove-block-path-refs
400400 [db]
401401 (when (d/entity db :block/path-refs )
402- (->> (d/datoms db :avet :block/path-refs )
403- (map :e )
404- (distinct )
405- (map (fn [id]
406- [:db/retract id :block/path-refs ])))))
402+ (let [remove-datoms (->> (d/datoms db :avet :block/path-refs )
403+ (map :e )
404+ (distinct )
405+ (mapv (fn [id]
406+ [:db/retract id :block/path-refs ])))]
407+ (conj remove-datoms [:db/retractEntity :block/path-refs ]))))
407408
408409(defn- remove-position-property-from-url-properties
409410 [db]
428429 [" 65.8" {:fix add-missing-page-name}]
429430 [" 65.9" {:properties [:logseq.property.embedding/hnsw-label-updated-at ]}]
430431 [" 65.10" {:properties [:block/journal-day :logseq.property.view/sort-groups-by-property :logseq.property.view/sort-groups-desc? ]}]
431- [" 65.11" {:fix remove-block-path-refs-datoms }]
432+ [" 65.11" {:fix remove-block-path-refs}]
432433 [" 65.12" {:fix remove-position-property-from-url-properties}]])
433434
434435(let [[major minor] (last (sort (map (comp (juxt :major :minor ) db-schema/parse-schema-version first)
Original file line number Diff line number Diff line change 2323 (and (:block/tx-id entity) (nil? (:block/title entity)))
2424 [[:db/retractEntity (:db/id entity)]]
2525 (= :block/path-refs (:db/ident entity))
26- (concat [[:db/retractEntity (:db/id entity)]]
27- (try
28- (db-migrate/remove-block-path-refs-datoms db)
29- (catch :default _e
30- nil )))
26+ (try
27+ (db-migrate/remove-block-path-refs db)
28+ (catch :default _e
29+ nil ))
3130 (and (= dispatch-key :block ) (nil? (:block/title entity)))
3231 [[:db/retractEntity (:db/id entity)]]
3332
You can’t perform that action at this time.
0 commit comments