From 9505023718637c370adc43c0e93def528b02e61e Mon Sep 17 00:00:00 2001 From: arne Date: Tue, 18 Nov 2025 22:14:08 +0100 Subject: [PATCH] Use keyword as index name --- src/computersandblues/lodestone/app.cljs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/computersandblues/lodestone/app.cljs b/src/computersandblues/lodestone/app.cljs index af11ded..7fe2f46 100644 --- a/src/computersandblues/lodestone/app.cljs +++ b/src/computersandblues/lodestone/app.cljs @@ -353,7 +353,7 @@ refresh-id (js/Date.now)] (swap! state update-in [:section/posts :loading] conj refresh-id) (-> (js/Promise.all #js [(db/count! ::db/posts) - (-> (db/open-cursor! ::db/posts "created_at" db/all "prev") + (-> (db/open-cursor! ::db/posts ::db/post-created-at db/all "prev") (db/transduce-cursor xform))]) (.then (fn [[total displayed-posts]] (swap! state update :section/posts #(-> (assoc % :total total) @@ -451,7 +451,7 @@ (db/create-object-store! db ::db/posts {:keyPath "id"})) 2 (fn migration-0002 [_ txn] (-> (db/open-store txn ::db/posts "readwrite") - (db/create-index! "created_at" "created_at" {:unique false})))}) + (db/create-index! ::db/post-created-at "created_at" {:unique false})))}) ;; go go go