diff --git a/common/src/app/common/files/defaults.cljc b/common/src/app/common/files/defaults.cljc index e7d64788aa..cd1fbbf9b0 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 62) +(def version 65) diff --git a/common/src/app/common/files/migrations.cljc b/common/src/app/common/files/migrations.cljc index c245302d6d..adce0aeee5 100644 --- a/common/src/app/common/files/migrations.cljc +++ b/common/src/app/common/files/migrations.cljc @@ -1179,6 +1179,24 @@ (update data :components update-vals update-component))) +(defn migrate-up-65 + [data] + (let [update-object + (fn [object] + (d/update-when object :plugin-data d/without-nils)) + + update-page + (fn [page] + (-> (update-object page) + (update :objects update-vals update-object)))] + + (-> data + (update-object) + (d/update-when :pages-index update-vals update-page) + (d/update-when :colors update-vals update-object) + (d/update-when :typographies update-vals update-object) + (d/update-when :components update-vals update-object)))) + (def migrations "A vector of all applicable migrations" [{:id 2 :migrate-up migrate-up-2} @@ -1229,4 +1247,5 @@ {:id 56 :migrate-up migrate-up-56} {:id 57 :migrate-up migrate-up-57} {:id 59 :migrate-up migrate-up-59} - {:id 62 :migrate-up migrate-up-62}]) + {:id 62 :migrate-up migrate-up-62} + {:id 65 :migrate-up migrate-up-65}])