fix(medusa): migrations cli should also pull from ${plugin}/dist (#3956)

* fix(medusa): migrations should also pull from dist

* chore: add changeset
This commit is contained in:
Derek Wene authored and GitHub committed 2023-05-28 12:18:42 +02:00
1 parent db41995307
commit e3cfbcd4a7
2 files changed
+10

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
---
"@medusajs/medusa": patch
---
fix(medusa): migrations cli should look for migrations in plugin dist folder
@@ -162,6 +162,11 @@ export default (directory, featureFlagRouter) => {
const exists = existsSync(`${p.resolve}/migrations`)
if (exists) {
migrationDirs.push(`${p.resolve}/migrations/*.js`)
continue
}
const distExists = existsSync(`${p.resolve}/dist/migrations`)
if (distExists) {
migrationDirs.push(`${p.resolve}/dist/migrations/*.js`)
}
}