diff --git a/.changeset/loud-terms-share.md b/.changeset/loud-terms-share.md new file mode 100644 index 0000000000..ce8a6c7abf --- /dev/null +++ b/.changeset/loud-terms-share.md @@ -0,0 +1,5 @@ +--- +"@medusajs/framework": patch +--- + +fix(framework): fix script migrations order diff --git a/packages/core/framework/src/migrations/migrator.ts b/packages/core/framework/src/migrations/migrator.ts index 60bbeb8a79..9873a7db77 100644 --- a/packages/core/framework/src/migrations/migrator.ts +++ b/packages/core/framework/src/migrations/migrator.ts @@ -139,6 +139,7 @@ export abstract class Migrator { cwd: basePath, ignore: ["**/index.{js,ts}", "**/*.d.ts"], }) + scriptFiles.sort((a, b) => a.localeCompare(b)) if (!scriptFiles?.length) { continue