File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
src/main/frontend/worker/db Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 114114 (->> (d/datoms db :avet (:v d))
115115 (mapcat (fn [d]
116116 [[:db/retract (:e d) (:a d) (:v d)]
117- [:db/add (:e d) new-db-ident (:v d)]])))))))))]
118- (when (seq tx-data)
119- (ldb/transact! conn tx-data))))
117+ [:db/add (:e d) new-db-ident (:v d)]])))))))))
118+ ; ; FIXME: :logseq.property.table/hidden-columns should be :property type to avoid issues like this
119+ hidden-columns-tx-data (->> (d/datoms db :avet :logseq.property.table/hidden-columns )
120+ (keep (fn [d]
121+ (when (re-find #"^(\d )" (name (:v d)))
122+ (let [new-value (keyword (namespace (:v d)) (string/replace-first (name (:v d)) #"^(\d )" " NUM-$1" ))]
123+ [:db/add (:e d) (:a d) new-value])))))
124+ tx-data' (concat tx-data hidden-columns-tx-data)]
125+ (when (seq tx-data')
126+ (ldb/transact! conn tx-data'))))
120127
121128(defn validate-db
122129 [conn]
You can’t perform that action at this time.
0 commit comments