From 8528de642f3330ec2377b21da23207dab89f0fe6 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 31 Jan 2024 18:39:01 +0100 Subject: [PATCH] :bug: Remove `:thumbnail` prop from all shapes on comp-v2 migration --- common/src/app/common/files/defaults.cljc | 2 +- common/src/app/common/files/migrations.cljc | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/common/src/app/common/files/defaults.cljc b/common/src/app/common/files/defaults.cljc index aae6cf1ef..61cd7f118 100644 --- a/common/src/app/common/files/defaults.cljc +++ b/common/src/app/common/files/defaults.cljc @@ -6,4 +6,4 @@ (ns app.common.files.defaults) -(def version 45) +(def version 46) diff --git a/common/src/app/common/files/migrations.cljc b/common/src/app/common/files/migrations.cljc index dfce09424..ccb2560f5 100644 --- a/common/src/app/common/files/migrations.cljc +++ b/common/src/app/common/files/migrations.cljc @@ -865,3 +865,14 @@ (d/update-when container :objects update-vals fix-shape))] (-> data (update :pages-index update-vals update-container)))) + +(defmethod migrate 46 + [data] + (letfn [(update-object [object] + (dissoc object :thumbnail)) + + (update-container [container] + (d/update-when container :objects update-vals update-object))] + (-> data + (update :pages-index update-vals update-container) + (update :components update-vals update-container))))