Merge branch 'master' into feat/capacitor-new

This commit is contained in:
charlie
2025-06-25 14:06:52 +08:00
27 changed files with 576 additions and 415 deletions

View File

@@ -256,7 +256,7 @@
[:p.text-error.text-xs [:small.opacity-80
(util/format "%s not found!" (string/capitalize type))]])))))
(defn open-lightbox
(defn open-lightbox!
[e]
(let [images (js/document.querySelectorAll ".asset-container img")
images (to-array images)
@@ -307,83 +307,95 @@
(defonce *resizing-image? (atom false))
(rum/defc asset-container
[asset-block src title metadata {:keys [breadcrumb? positioned? local? full-text]}]
[:div.asset-container
{:key "resize-asset-container"}
[:img.rounded-sm.relative
(merge
{:loading "lazy"
:referrerPolicy "no-referrer"
:src src
:title title}
metadata)]
(when (and (not breadcrumb?)
(not positioned?))
[:<>
(let [image-src (fs/asset-path-normalize src)]
[:.asset-action-bar {:aria-hidden "true"}
[:.flex
(when-not config/publishing?
[:button.asset-action-btn
{:title (t :asset/delete)
:tabIndex "-1"
:on-pointer-down util/stop
:on-click
(fn [e]
(util/stop e)
(when-let [block-id (some-> (.-target e) (.closest "[blockid]") (.getAttribute "blockid") (uuid))]
(let [*el-ref (rum/use-ref nil)
image-src (fs/asset-path-normalize src)
get-blockid #(some-> (rum/deref *el-ref) (.closest "[blockid]") (.getAttribute "blockid") (uuid))]
[:div.asset-container
{:key "resize-asset-container"
:on-pointer-down util/stop
:on-click (fn [e]
(when (= "IMG" (some-> (.-target e) (.-nodeName)))
(open-lightbox! e)))
:ref *el-ref}
[:img.rounded-sm.relative
(merge
{:loading "lazy"
:referrerPolicy "no-referrer"
:src src
:title title}
metadata)]
(when (and (not breadcrumb?)
(not positioned?))
[:<>
(let [handle-copy!
(fn [_e]
(-> (util/copy-image-to-clipboard image-src)
(p/then #(notification/show! "Copied!" :success))))
handle-delete!
(fn [_e]
(when-let [block-id (get-blockid)]
(let [*local-selected? (atom local?)]
(-> (shui/dialog-confirm!
[:div.text-xs.opacity-60.-my-2
(when (and local? (not= (:block/uuid asset-block) block-id))
[:label.flex.gap-1.items-center
(shui/checkbox
{:default-checked @*local-selected?
:on-checked-change #(reset! *local-selected? %)})
(t :asset/physical-delete)])]
{:title (t :asset/confirm-delete (.toLocaleLowerCase (t :text/image)))
:outside-cancel? true})
(p/then (fn []
(shui/dialog-close!)
(editor-handler/delete-asset-of-block!
{:block-id block-id
:asset-block asset-block
:local? local?
:delete-local? @*local-selected?
:repo (state/get-current-repo)
:href src
:title title
:full-text full-text})))))))}
(ui/icon "trash")])
[:div.text-xs.opacity-60.-my-2
(when (and local? (not= (:block/uuid asset-block) block-id))
[:label.flex.gap-1.items-center
(shui/checkbox
{:default-checked @*local-selected?
:on-checked-change #(reset! *local-selected? %)})
(t :asset/physical-delete)])]
{:title (t :asset/confirm-delete (.toLocaleLowerCase (t :text/image)))
:outside-cancel? true})
(p/then (fn []
(shui/dialog-close!)
(editor-handler/delete-asset-of-block!
{:block-id block-id
:asset-block asset-block
:local? local?
:delete-local? @*local-selected?
:repo (state/get-current-repo)
:href src
:title title
:full-text full-text})))))))]
[:.asset-action-bar {:aria-hidden "true"}
(shui/button-group
(shui/button
{:variant :outline
:size :icon
:class "h-7 w-7"
:on-pointer-down util/stop
:on-click (fn [e]
(shui/popup-show! (.closest (.-target e) ".asset-action-bar")
(fn []
[:div
{:on-click #(shui/popup-hide!)}
(shui/dropdown-menu-item
{:on-click #(some-> (db/entity [:block/uuid (get-blockid)]) (editor-handler/edit-block! :max))}
[:span.flex.items-center.gap-1
(ui/icon "edit") (t :asset/edit-block)])
(shui/dropdown-menu-item
{:on-click handle-copy!}
[:span.flex.items-center.gap-1
(ui/icon "copy") (t :asset/copy)])
(when (util/electron?)
(shui/dropdown-menu-item
{:on-click (fn [e]
(util/stop e)
(if local?
(ipc/ipc "openFileInFolder" image-src)
(js/window.apis.openExternal image-src)))}
[:span.flex.items-center.gap-1
(ui/icon "folder-pin") (t (if local? :asset/show-in-folder :asset/open-in-browser))]))
[:button.asset-action-btn
{:title (t :asset/copy)
:tabIndex "-1"
:on-pointer-down util/stop
:on-click (fn [e]
(util/stop e)
(-> (util/copy-image-to-clipboard image-src)
(p/then #(notification/show! "Copied!" :success))))}
(ui/icon "copy")]
[:button.asset-action-btn
{:title (t :asset/maximize)
:tabIndex "-1"
:on-pointer-down util/stop
:on-click open-lightbox}
(ui/icon "maximize")]
(when (util/electron?)
[:button.asset-action-btn
{:title (t (if local? :asset/show-in-folder :asset/open-in-browser))
:tabIndex "-1"
:on-pointer-down util/stop
:on-click (fn [e]
(util/stop e)
(if local?
(ipc/ipc "openFileInFolder" image-src)
(js/window.apis.openExternal image-src)))}
(shui/tabler-icon "folder-pin")])]])])])
(when-not config/publishing?
[:<>
(shui/dropdown-menu-separator)
(shui/dropdown-menu-item
{:on-click handle-delete!}
[:span.flex.items-center.gap-1.text-red-700
(ui/icon "trash") (t :asset/delete)])])
])
{:align :start}))}
(shui/tabler-icon "dots-vertical")))])])]))
;; TODO: store image height and width for better ux
(rum/defcs ^:large-vars/cleanup-todo resizable-image <
@@ -396,32 +408,32 @@
positioned? (:property-position config)
asset-block (:asset-block config)
width (or (get-in asset-block [:logseq.property.asset/resize-metadata :width])
(:width metadata))
(:width metadata))
*width (get state ::size)
width (or @*width width 250)
metadata' (merge
(cond->
{:height 125}
width
(assoc :width width))
metadata)
(cond->
{:height 125}
width
(assoc :width width))
metadata)
resizable? (and (not (mobile-util/native-platform?))
(not breadcrumb?)
(not positioned?))
(not breadcrumb?)
(not positioned?))
asset-container-cp (asset-container asset-block src title metadata'
{:breadcrumb? breadcrumb?
:positioned? positioned?
:local? local?
:full-text full-text})]
{:breadcrumb? breadcrumb?
:positioned? positioned?
:local? local?
:full-text full-text})]
(if (or (:disable-resize? config)
(not resizable?))
(not resizable?))
asset-container-cp
[:div.ls-resize-image.rounded-md
asset-container-cp
(resize-image-handles
(fn [k ^js event]
(let [dx (.-dx event)
^js target (.-target event)]
(fn [k ^js event]
(let [dx (.-dx event)
^js target (.-target event)]
(case k
:start
@@ -689,10 +701,9 @@
All page-names are sanitized except page-name-in-block"
[state
{:keys [contents-page? whiteboard-page? other-position? show-unique-title? stop-click-event?
{:keys [contents-page? whiteboard-page? other-position? show-unique-title?
on-context-menu with-parent?]
:or {stop-click-event? true
with-parent? true}
:or {with-parent? true}
:as config}
page-entity children label]
(let [*hover? (::hover? state)
@@ -718,9 +729,6 @@
(editor-handler/block->data-transfer! page-name e true))
:on-mouse-over #(reset! *hover? true)
:on-mouse-leave #(reset! *hover? false)
:on-click (fn [e]
(when (and stop-click-event? (not (util/link? (.-target e))))
(util/stop e)))
:on-pointer-down (fn [^js e]
(cond
(util/link? (.-target e))
@@ -741,7 +749,6 @@
(reset! *mouse-down? true))))
:on-pointer-up (fn [e]
(when @*mouse-down?
(util/stop e)
(state/clear-edit!)
(when-not (:disable-click? config)
(<open-page-ref config page-entity e page-name contents-page?))
@@ -1550,9 +1557,10 @@
(->elem
:a
(cond->
{:href (path/path-join "file://" path)
:data-href path
:target "_blank"}
{:on-click (fn [e]
(util/stop e)
(js/window.apis.openPath path))
:data-href path}
title
(assoc :title title))
(map-inline config label)))
@@ -1632,9 +1640,14 @@
href)]
(->elem
:a
(cond-> {:href (path/path-join "file://" href*)
:data-href href*
:target "_blank"}
(cond-> (if (util/electron?)
{:on-click (fn [e]
(util/stop e)
(js/window.apis.openPath path))
:data-href href*}
{:href (path/path-join "file://" href*)
:data-href href*
:target "_blank"})
title (assoc :title title))
(map-inline config label))))))
@@ -1903,7 +1916,7 @@
(= name "namespace")
(if (config/db-based-graph? (state/get-current-repo))
[:div.warning "Namespace is deprecated, use tags instead"]
[:div.warning (str "{{namespace}} is deprecated. Use the " common-config/library-page-name " feature instead.")]
(let [namespace (first arguments)]
(when-not (string/blank? namespace)
(let [namespace (string/lower-case (page-ref/get-page-name! namespace))
@@ -2856,8 +2869,7 @@
(ui/icon "X" {:size 14})))
(page-cp (assoc config
:tag? true
:disable-preview? true
:stop-click-event? false) tag)]))
:disable-preview? true) tag)]))
popup-opts))}
(for [tag (take 2 block-tags)]
[:div.block-tag.pl-2
@@ -3261,8 +3273,7 @@
rest)
config (assoc config
:breadcrumb? true
:disable-preview? true
:stop-click-event? false)]
:disable-preview? true)]
(when (seq parents)
(let [parents-props (doall
(for [{:block/keys [uuid name title] :as block} parents]

View File

@@ -29,8 +29,11 @@
@apply relative inline-block mt-2 w-full;
.asset-action-bar {
@apply top-0.5 right-0.5 absolute flex items-center
border bg-gray-02 rounded opacity-0 transition-opacity;
@apply top-1 right-1 absolute flex items-center opacity-0 transition-opacity;
&[data-popup-active] {
@apply opacity-100;
}
}
.asset-action-btn {
@@ -117,6 +120,12 @@
}
}
.breadcrumb {
.property-value-inner[data-type], .property-value-inner .select-item {
display: inline;
}
}
.open-block-ref-link {
background-color: var(--ls-page-properties-background-color);
padding: 1px 4px;
@@ -1118,7 +1127,7 @@ html.is-mac {
}
.ls-resize-image {
@apply flex relative;
@apply flex relative w-fit cursor-pointer;
.handle-left, .handle-right {
@apply absolute w-[6px] h-[15%] min-h-[30px] bg-black/30 hover:bg-black/70

View File

@@ -136,18 +136,20 @@
(defn- matched-pages-with-new-page [partial-matched-pages db-tag? q]
(if (or
(if db-tag?
(let [entity (db/get-page q)]
(and (ldb/internal-page? entity) (= (:block/title entity) q)))
;; Page existence here should be the same as entity-util/page?.
;; Don't show 'New page' if a page has any of these tags
(db/page-exists? q db-class/page-classes))
(db/page-exists? q (if db-tag?
#{:logseq.class/Tag}
;; Page existence here should be the same as entity-util/page?.
;; Don't show 'New page' if a page has any of these tags
db-class/page-classes))
(and db-tag? (some ldb/class? (:block/_alias (db/get-page q)))))
partial-matched-pages
(if db-tag?
(concat [{:block/title (str (t :new-tag) " " q)}]
partial-matched-pages)
(concat
;; Don't show 'New tag' for an internal page because it already shows 'Convert ...'
(when-not (let [entity (db/get-page q)]
(and (ldb/internal-page? entity) (= (:block/title entity) q)))
[{:block/title (str (t :new-tag) " " q)}])
partial-matched-pages)
(cons {:block/title (str (t :new-page) " " q)}
partial-matched-pages))))
@@ -757,6 +759,9 @@
(and (= type :esc) (editor-handler/editor-commands-popup-exists?))
nil
(state/editor-in-composition?)
nil
(or (contains?
#{:commands :page-search :page-search-hashtag :block-search :template-search
:property-search :property-value-search :datepicker}

View File

@@ -393,7 +393,7 @@
(rum/defc overdue
[date content]
(let [[current-time set-current-time!] (rum/use-state (t/now))]
(let [[current-time set-current-time!] (hooks/use-state (t/now))]
(hooks/use-effect!
(fn []
(let [timer (js/setInterval (fn [] (set-current-time! (t/now))) (* 1000 60 3))]
@@ -455,7 +455,7 @@
(rum/defc date-picker
[value {:keys [block property datetime? on-change on-delete del-btn? editing? multiple-values? other-position?]}]
(let [*el (rum/use-ref nil)
(let [*el (hooks/use-ref nil)
content-fn (fn [{:keys [id]}] (calendar-inner id
{:block block
:property property
@@ -836,8 +836,8 @@
(rum/defc property-value-select-node < rum/static
[block property opts
{:keys [*show-new-property-config?]}]
(let [[initial-choices set-initial-choices!] (rum/use-state nil)
[result set-result!] (rum/use-state nil)
(let [[initial-choices set-initial-choices!] (hooks/use-state nil)
[result set-result!] (hooks/use-state nil)
set-result-and-initial-choices! (fn [value]
(set-initial-choices! value)
(set-result! value))
@@ -1144,7 +1144,7 @@
(rum/defc single-value-select
[block property value select-opts {:keys [value-render] :as opts}]
(let [*el (rum/use-ref nil)
(let [*el (hooks/use-ref nil)
editing? (:editing? opts)
type (:logseq.property/type property)
select-opts' (assoc select-opts :multiple-choices? false)
@@ -1227,11 +1227,12 @@
(rum/defc single-number-input
[block property value-block table-view?]
(let [[editing? set-editing!] (rum/use-state false)
*ref (rum/use-ref nil)
*input-ref (rum/use-ref nil)
(let [[editing? set-editing!] (hooks/use-state false)
*ref (hooks/use-ref nil)
*input-ref (hooks/use-ref nil)
number-value (db-property/property-value-content value-block)
[value set-value!] (rum/use-state number-value)
[value set-value!] (hooks/use-state number-value)
[*value _] (hooks/use-state (atom value))
set-property-value! (fn [value & {:keys [exit-editing?]
:or {exit-editing? true}}]
(p/do!
@@ -1244,6 +1245,10 @@
(when exit-editing?
(set-editing! false))))]
(hooks/use-effect!
(fn []
#(set-property-value! @*value))
[])
[:div.ls-number.flex.flex-1.jtrigger
{:ref *ref
:on-click #(do
@@ -1256,8 +1261,11 @@
:class (str "ls-number-input h-6 px-0 py-0 border-none bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 text-base"
(when table-view? " text-sm"))
:value value
:on-change (fn [e] (set-value! (util/evalue e)))
:on-blur (fn [_e] (set-property-value! value))
:on-change (fn [e]
(set-value! (util/evalue e))
(reset! *value (util/evalue e)))
:on-blur (fn [_e]
(set-property-value! value))
:on-key-down (fn [e]
(let [input (rum/deref *input-ref)
pos (cursor/pos input)
@@ -1369,7 +1377,7 @@
[block property v {:keys [on-chosen editing?] :as opts}]
(let [type (:logseq.property/type property)
date? (= type :date)
*el (rum/use-ref nil)
*el (hooks/use-ref nil)
items (cond->> (if (entity-map? v) #{v} v)
(= (:db/ident property) :block/tags)
(remove (fn [v] (contains? ldb/hidden-tags (:db/ident v)))))

View File

@@ -102,13 +102,14 @@
{:asChild true}
(shui/button
{:variant "ghost"
:class "!px-1"
:class "graph-action-btn !px-1"
:size :sm}
(ui/icon "dots" {:size 15})))
(shui/dropdown-menu-content
{:align "end"}
(shui/dropdown-menu-item
{:key "delete-locally"
:class "delete-local-graph-menu-item"
:on-click (fn []
(let [prompt-str (if db-based?
(str "Are you sure to permanently delete the graph \"" graph-name "\" from Logseq?")
@@ -122,10 +123,11 @@
(p/then (fn []
(repo-handler/remove-repo! repo)
(state/pub-event! [:graph/unlinked repo (state/get-current-repo)]))))))}
"Delete")
"Delete local graph")
(when (and remote? (or (and db-based? manager?) (not db-based?)))
(shui/dropdown-menu-item
{:key "delete-remotely"
:class "delete-remote-graph-menu-item"
:on-click (fn []
(let [prompt-str (str "Are you sure to permanently delete the graph \"" graph-name "\" from our server?")]
(-> (shui/dialog-confirm!

View File

@@ -1,14 +1,10 @@
(ns frontend.extensions.lightbox
(:require [promesa.core :as p]
[cljs-bean.core :as bean]
[frontend.util :as util]))
(:require [cljs-bean.core :as bean]))
(defn preview-images!
[images]
(p/let [_ (util/js-load$ (str util/JS_ROOT "/photoswipe.umd.min.js"))
_ (util/js-load$ (str util/JS_ROOT "/photoswipe-lightbox.umd.min.js"))]
(let [options {:dataSource images :pswpModule js/window.PhotoSwipe :showHideAnimationType "fade"}
^js lightbox (js/window.PhotoSwipeLightbox. (bean/->js options))]
(doto lightbox
(.init)
(.loadAndOpen 0)))))
(let [options {:dataSource images :pswpModule js/window.PhotoSwipe :showHideAnimationType "fade"}
^js lightbox (js/window.PhotoSwipeLightbox. (bean/->js options))]
(doto lightbox
(.init)
(.loadAndOpen 0))))

View File

@@ -380,7 +380,7 @@
(when-let [e (some->> (:key current) (str "hls__") (db-model/get-page))]
(rfe/push-state :page {:name (str (:block/uuid e))} (if id {:anchor (str "block-content-" + id)} nil)))))))
(defn open-lightbox
(defn open-lightbox!
[e]
(let [images (js/document.querySelectorAll ".hl-area img")
images (to-array images)
@@ -443,7 +443,7 @@
{:title (t :asset/maximize)
:tabIndex "-1"
:on-pointer-down util/stop
:on-click open-lightbox}
:on-click open-lightbox!}
(ui/icon "maximize")]]
[:img.w-full {:src @*src}]]])))))

View File

@@ -23,7 +23,7 @@
When returning false, this fn also displays appropriate notifications to the user"
[repo block tag-entity]
(try
(outliner-validate/validate-unique-by-name-tag-and-block-type
(outliner-validate/validate-unique-by-name-and-tags
(db/get-db repo)
(:block/title block)
(update block :block/tags (fnil conj #{}) tag-entity))

View File

@@ -2706,7 +2706,10 @@
(let [repo (state/get-current-repo)
editor-state (assoc (get-state)
:block-id (:block/uuid next-block)
:value (:block/title next-block))]
:value (:block/title next-block)
:block-container (util/get-next-block-non-collapsed
(util/rec-get-node (state/get-input) "ls-block")
{:exclude-property? true}))]
(delete-block-inner! repo editor-state)))))
(defn keydown-delete-handler

View File

@@ -119,12 +119,12 @@
(defn rename-properties
[props-to-rename & {:keys [replace-fn]}]
(fn [conn]
(when (ldb/db-based-graph? @conn)
(let [props-tx (rename-properties-aux @conn props-to-rename)
(fn [db]
(when (ldb/db-based-graph? db)
(let [props-tx (rename-properties-aux db props-to-rename)
fix-tx (mapcat (fn [[old new]]
;; can't use datoms b/c user properties aren't indexed
(->> (d/q '[:find ?b ?prop-v :in $ ?prop :where [?b ?prop ?prop-v]] @conn old)
(->> (d/q '[:find ?b ?prop-v :in $ ?prop :where [?b ?prop ?prop-v]] db old)
(mapcat (fn [[id prop-value]]
(if (fn? replace-fn)
(replace-fn id prop-value)
@@ -136,10 +136,10 @@
(comment
(defn- rename-classes
[classes-to-rename]
(fn [conn _search-db]
(when (ldb/db-based-graph? @conn)
(fn [db]
(when (ldb/db-based-graph? db)
(mapv (fn [[old new]]
(merge {:db/id (:db/id (d/entity @conn old))
(merge {:db/id (:db/id (d/entity db old))
:db/ident new}
(when-let [new-title (get-in db-class/built-in-classes [new :title])]
{:block/title new-title
@@ -147,9 +147,8 @@
classes-to-rename)))))
(defn fix-rename-parent-to-extends
[conn _search-db]
(let [db @conn
parent-entity (d/entity db :logseq.property/parent)]
[db]
(let [parent-entity (d/entity db :logseq.property/parent)]
(when parent-entity
(let [old-p :logseq.property/parent
new-p :logseq.property.class/extends
@@ -160,7 +159,7 @@
new-p' (if (ldb/class? page) new-p :block/parent)]
[[:db/retract id old-p]
[:db/add id new-p' prop-value]]))})
rename-property-tx (f conn)
rename-property-tx (f db)
library-page (if-let [page (ldb/get-built-in-page db common-config/library-page-name)]
page
(-> (sqlite-util/build-new-page common-config/library-page-name)
@@ -210,11 +209,10 @@
[:db/retract id :logseq.property/enable-history?]])
(defn separate-classes-and-properties
[conn _sqlite-db]
[db]
;; find all properties that're classes, create new properties to separate them
;; from classes.
(let [db @conn
class-ids (d/q
(let [class-ids (d/q
'[:find [?b ...]
:where
[?b :block/tags :logseq.class/Property]
@@ -253,10 +251,9 @@
class-ids)))
(defn fix-tag-properties
[conn _sqlite-db]
[db]
;; find all classes that're still used as properties
(let [db @conn
class-ids (d/q
(let [class-ids (d/q
'[:find [?b ...]
:where
[?b :block/tags :logseq.class/Tag]
@@ -275,9 +272,8 @@
class-ids)))
(defn add-missing-db-ident-for-tags
[conn _sqlite-db]
(let [db @conn
class-ids (d/q
[db _sqlite-db]
(let [class-ids (d/q
'[:find [?b ...]
:where
[?b :block/tags :logseq.class/Tag]
@@ -294,10 +290,9 @@
class-ids)))
(defn fix-using-properties-as-tags
[conn _sqlite-db]
[db]
;; find all properties that're tags
(let [db @conn
property-ids (->>
(let [property-ids (->>
(d/q
'[:find ?b ?i
:where
@@ -308,7 +303,7 @@
(map first))]
(mapcat
(fn [id]
(let [property (d/entity @conn id)
(let [property (d/entity db id)
title (:block/title property)]
(into (retract-property-attributes id)
[[:db/retract id :logseq.property/parent]
@@ -316,10 +311,9 @@
property-ids)))
(defn remove-block-order-for-tags
[conn _sqlite-db]
[db]
;; find all properties that're tags
(let [db @conn
tag-ids (d/q
(let [tag-ids (d/q
'[:find [?b ...]
:where
[?b :block/tags :logseq.class/Tag]
@@ -408,7 +402,7 @@
:db-migrate? true})))
(defn- upgrade-version!
[conn search-db db-based? version {:keys [properties classes fix]}]
[conn db-based? version {:keys [properties classes fix]}]
(let [version (db-schema/parse-schema-version version)
db @conn
new-properties (->> (select-keys db-property/built-in-properties properties)
@@ -431,7 +425,7 @@
(when-let [db-ident (:db/ident class)]
{:db/ident db-ident})) new-classes)
fixes (when (fn? fix)
(fix conn search-db))
(fix db))
tx-data (if db-based? (concat new-class-idents new-properties new-classes fixes) fixes)
tx-data' (concat
[(sqlite-util/kv :logseq.kv/schema-version version)]
@@ -442,7 +436,7 @@
(defn migrate
"Migrate 'frontend' datascript schema and data. To add a new migration,
add an entry to schema-version->updates and bump db-schema/version"
[conn search-db]
[conn]
(when (ldb/db-based-graph? @conn)
(let [db @conn
version-in-db (db-schema/parse-schema-version (or (:kv/value (d/entity db :logseq.kv/schema-version)) 0))
@@ -465,7 +459,7 @@
schema-version->updates)]
(println "DB schema migrated from" version-in-db)
(doseq [[v m] updates]
(upgrade-version! conn search-db db-based? v m))
(upgrade-version! conn db-based? v m))
(ensure-built-in-data-exists! conn))
(catch :default e
(prn :error (str "DB migration failed to migrate to " db-schema/version " from " version-in-db ":"))

View File

@@ -296,7 +296,7 @@
(gc-sqlite-dbs! db client-ops-db conn {})
(db-migrate/migrate conn search-db)
(db-migrate/migrate conn)
(db-listener/listen-db-changes! repo (get @*datascript-conns repo))))))