mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
🐛 Fix migrations set decoding on binfile import
that causes incorrect migration ordering on the table
This commit is contained in:
@@ -420,7 +420,7 @@
|
||||
:min 0
|
||||
:max 1
|
||||
:compile
|
||||
(fn [{:keys [kind max min] :as props} children _]
|
||||
(fn [{:keys [kind max min ordered] :as props} children _]
|
||||
(let [kind (or (last children) kind)
|
||||
|
||||
pred
|
||||
@@ -456,18 +456,23 @@
|
||||
(fn [value]
|
||||
(every? pred value)))
|
||||
|
||||
empty-set
|
||||
(if ordered
|
||||
(d/ordered-set)
|
||||
#{})
|
||||
|
||||
decode
|
||||
(fn [v]
|
||||
(cond
|
||||
(string? v)
|
||||
(let [v (str/split v #"[\s,]+")]
|
||||
(into #{} xf:filter-word-strings v))
|
||||
(into empty-set xf:filter-word-strings v))
|
||||
|
||||
(set? v)
|
||||
v
|
||||
|
||||
(coll? v)
|
||||
(into #{} v)
|
||||
(into empty-set v)
|
||||
|
||||
:else
|
||||
v))
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
[:version :int]
|
||||
[:features ::cfeat/features]
|
||||
[:migrations {:optional true}
|
||||
[::sm/set :string]]])
|
||||
[::sm/set {:ordered true} :string]]])
|
||||
|
||||
(sm/register! ::data schema:data)
|
||||
(sm/register! ::file schema:file)
|
||||
|
||||
Reference in New Issue
Block a user