mirror of
https://github.com/penpot/penpot.git
synced 2025-02-12 18:18:24 -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:
parent
8145eb89d7
commit
15a896e050
2 changed files with 21 additions and 2 deletions
|
@ -6,4 +6,4 @@
|
||||||
|
|
||||||
(ns app.common.files.defaults)
|
(ns app.common.files.defaults)
|
||||||
|
|
||||||
(def version 62)
|
(def version 65)
|
||||||
|
|
|
@ -1179,6 +1179,24 @@
|
||||||
|
|
||||||
(update data :components update-vals update-component)))
|
(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
|
(def migrations
|
||||||
"A vector of all applicable migrations"
|
"A vector of all applicable migrations"
|
||||||
[{:id 2 :migrate-up migrate-up-2}
|
[{:id 2 :migrate-up migrate-up-2}
|
||||||
|
@ -1229,4 +1247,5 @@
|
||||||
{:id 56 :migrate-up migrate-up-56}
|
{:id 56 :migrate-up migrate-up-56}
|
||||||
{:id 57 :migrate-up migrate-up-57}
|
{:id 57 :migrate-up migrate-up-57}
|
||||||
{:id 59 :migrate-up migrate-up-59}
|
{: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}])
|
||||||
|
|
Loading…
Add table
Reference in a new issue