chore(modules-sdk): parallel migrations (#13898)
This commit is contained in:
@@ -3,6 +3,7 @@ import {
|
||||
container,
|
||||
logger,
|
||||
MedusaAppLoader,
|
||||
Migrator,
|
||||
} from "@medusajs/framework"
|
||||
import { asValue } from "@medusajs/framework/awilix"
|
||||
import { EntityManager } from "@medusajs/framework/mikro-orm/postgresql"
|
||||
@@ -124,6 +125,9 @@ const beforeAll_ = async () => {
|
||||
medusaAppLoader = new MedusaAppLoader(container as any)
|
||||
|
||||
// Migrations
|
||||
const migrator = new Migrator({ container })
|
||||
await migrator.ensureMigrationsTable()
|
||||
|
||||
await medusaAppLoader.runModulesMigrations()
|
||||
const linkPlanner = await medusaAppLoader.getLinksExecutionPlanner()
|
||||
const plan = await linkPlanner.createPlan()
|
||||
|
||||
Reference in New Issue
Block a user