fix(utils): fix error when generating migrations for a module with existing snapshot (#14218)

This commit is contained in:
Shahed Nasser authored and GitHub committed 2025-12-08 08:54:32 +02:00
1 parent a791ea03ab
commit b517137466
2 files changed
+6 -1

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
---
"@medusajs/utils": patch
---
fix(utils): fix error when generating migrations for a module with existing snapshot
+1 -1
View File
@@ -210,7 +210,7 @@ export class Migrations extends EventEmitter<MigrationsEvents> {
) )
if (snapshotFile) { if (snapshotFile) {
const absoluteName = join(snapshotFile.path, snapshotFile.name) const absoluteName = join(snapshotFile.parentPath, snapshotFile.name)
if (absoluteName !== snapshotPath) { if (absoluteName !== snapshotPath) {
await rename(absoluteName, snapshotPath) await rename(absoluteName, snapshotPath)
} }