mirror of
https://github.com/logseq/logseq.git
synced 2026-05-25 13:14:39 +00:00
fix: num prefixed properties in hidden-columns
This commit is contained in:
@@ -114,9 +114,16 @@
|
||||
(->> (d/datoms db :avet (:v d))
|
||||
(mapcat (fn [d]
|
||||
[[:db/retract (:e d) (:a d) (:v d)]
|
||||
[:db/add (:e d) new-db-ident (:v d)]])))))))))]
|
||||
(when (seq tx-data)
|
||||
(ldb/transact! conn tx-data))))
|
||||
[:db/add (:e d) new-db-ident (:v d)]])))))))))
|
||||
;; FIXME: :logseq.property.table/hidden-columns should be :property type to avoid issues like this
|
||||
hidden-columns-tx-data (->> (d/datoms db :avet :logseq.property.table/hidden-columns)
|
||||
(keep (fn [d]
|
||||
(when (re-find #"^(\d)" (name (:v d)))
|
||||
(let [new-value (keyword (namespace (:v d)) (string/replace-first (name (:v d)) #"^(\d)" "NUM-$1"))]
|
||||
[:db/add (:e d) (:a d) new-value])))))
|
||||
tx-data' (concat tx-data hidden-columns-tx-data)]
|
||||
(when (seq tx-data')
|
||||
(ldb/transact! conn tx-data'))))
|
||||
|
||||
(defn validate-db
|
||||
[conn]
|
||||
|
||||
Reference in New Issue
Block a user