mirror of
https://github.com/penpot/penpot.git
synced 2025-06-21 09:57:00 +02:00
🐛 Fix incorrect migration application after binfile import
This commit is contained in:
parent
f155042958
commit
f65518f865
2 changed files with 9 additions and 3 deletions
|
@ -15,6 +15,7 @@
|
||||||
[app.common.data.macros :as dm]
|
[app.common.data.macros :as dm]
|
||||||
[app.common.exceptions :as ex]
|
[app.common.exceptions :as ex]
|
||||||
[app.common.features :as cfeat]
|
[app.common.features :as cfeat]
|
||||||
|
[app.common.files.migrations :as-alias fmg]
|
||||||
[app.common.json :as json]
|
[app.common.json :as json]
|
||||||
[app.common.logging :as l]
|
[app.common.logging :as l]
|
||||||
[app.common.schema :as sm]
|
[app.common.schema :as sm]
|
||||||
|
@ -745,7 +746,14 @@
|
||||||
(assoc :name file-name)
|
(assoc :name file-name)
|
||||||
(assoc :project-id project-id)
|
(assoc :project-id project-id)
|
||||||
(dissoc :options)
|
(dissoc :options)
|
||||||
(bfc/process-file))]
|
(bfc/process-file)
|
||||||
|
|
||||||
|
;; NOTE: this is necessary because when we just
|
||||||
|
;; creating a new file from imported artifact,
|
||||||
|
;; there are no migrations registered on the
|
||||||
|
;; database, so we need to persist all of them, not
|
||||||
|
;; only the applied
|
||||||
|
(vary-meta dissoc ::fmg/migrated))]
|
||||||
|
|
||||||
|
|
||||||
(bfm/register-pending-migrations! cfg file)
|
(bfm/register-pending-migrations! cfg file)
|
||||||
|
|
|
@ -37,8 +37,6 @@
|
||||||
#?(:cljs (l/set-level! :info))
|
#?(:cljs (l/set-level! :info))
|
||||||
|
|
||||||
(declare ^:private available-migrations)
|
(declare ^:private available-migrations)
|
||||||
(declare ^:private migration-up-index)
|
|
||||||
(declare ^:private migration-down-index)
|
|
||||||
|
|
||||||
(def version cfd/version)
|
(def version cfd/version)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue