mirror of
https://github.com/penpot/penpot.git
synced 2025-05-22 22:46:10 +02:00
✨ Add file snapshoting on migration
This commit is contained in:
parent
47e877d6c3
commit
b0418ff5f2
3 changed files with 6 additions and 3 deletions
|
@ -33,6 +33,7 @@
|
|||
[app.db :as db]
|
||||
[app.media :as media]
|
||||
[app.rpc.commands.files :as files]
|
||||
[app.rpc.commands.files-snapshot :as fsnap]
|
||||
[app.rpc.commands.media :as cmd.media]
|
||||
[app.storage :as sto]
|
||||
[app.storage.tmp :as tmp]
|
||||
|
@ -645,6 +646,9 @@
|
|||
(let [system (update system ::sto/storage media/configure-assets-storage)]
|
||||
(db/tx-run! system
|
||||
(fn [{:keys [::db/conn] :as system}]
|
||||
(fsnap/take-file-snapshot! system {:file-id file-id
|
||||
:label "migration/components-v2"})
|
||||
|
||||
(binding [*system* system]
|
||||
(-> (db/get conn :file {:id file-id})
|
||||
(update :features db/decode-pgarray #{})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue