fix(utils): fix error when generating migrations for a module with existing snapshot (#14218)
This commit is contained in:
5
.changeset/icy-vans-kneel.md
Normal file
5
.changeset/icy-vans-kneel.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@medusajs/utils": patch
|
||||
---
|
||||
|
||||
fix(utils): fix error when generating migrations for a module with existing snapshot
|
||||
@@ -210,7 +210,7 @@ export class Migrations extends EventEmitter<MigrationsEvents> {
|
||||
)
|
||||
|
||||
if (snapshotFile) {
|
||||
const absoluteName = join(snapshotFile.path, snapshotFile.name)
|
||||
const absoluteName = join(snapshotFile.parentPath, snapshotFile.name)
|
||||
if (absoluteName !== snapshotPath) {
|
||||
await rename(absoluteName, snapshotPath)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user