fix(utils, product, pricing, link-modules): add missing dependencies for utils + fix migration path issue (#4915)

* fix: add missing dependencies for utils

* chore: migration path is set from the calling package

* chore: update changeset
This commit is contained in:
Riqwan Thamir
2023-08-31 09:16:02 +02:00
committed by GitHub
parent 4d16acf5f0
commit 87bade096e
15 changed files with 87 additions and 21 deletions

View File

@@ -2,7 +2,8 @@ import { ModuleServiceInitializeOptions } from "@medusajs/types"
export async function mikroOrmCreateConnection(
database: ModuleServiceInitializeOptions["database"] & { connection?: any },
entities: any[]
entities: any[],
pathToMigrations: string
) {
let schema = database.schema || "public"
@@ -33,7 +34,7 @@ export async function mikroOrmCreateConnection(
tsNode: process.env.APP_ENV === "development",
type: "postgresql",
migrations: {
path: __dirname + "/../migrations",
path: pathToMigrations,
},
})
}