0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-08 08:09:14 -05:00

🐛 Add migration for fix files with invalid token-data (#5712)

Because of previous bug that is already fixed
This commit is contained in:
Andrey Antukh 2025-01-30 09:17:02 +01:00 committed by GitHub
parent 8145eb89d7
commit 15a896e050
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 21 additions and 2 deletions

View file

@ -6,4 +6,4 @@
(ns app.common.files.defaults)
(def version 62)
(def version 65)

View file

@ -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}])