fix(product, types): correct path for migration files + fix types on products service module (#4348)

* chore: correct path for migration files

* chore: resolve the path for migrations to be picked up

* chore: fix types on product service interface

* chore: update changeset to reflect type changes

* chore: changed changeset to the correct format
This commit is contained in:
Riqwan Thamir
2023-06-19 16:12:47 +02:00
committed by GitHub
parent bf4f5e7147
commit dc120121c1
3 changed files with 18 additions and 13 deletions
@@ -1,6 +1,5 @@
import { MikroORM, PostgreSqlDriver } from "@mikro-orm/postgresql"
import { ProductServiceInitializeOptions } from "../types"
import { Utils } from "@mikro-orm/core"
export async function createConnection(
database: ProductServiceInitializeOptions["database"],
@@ -20,7 +19,7 @@ export async function createConnection(
tsNode: process.env.APP_ENV === "development",
type: "postgresql",
migrations: {
path: Utils.detectTsNode() ? "src/migrations" : "dist/migrations",
path: __dirname + "/../migrations",
},
})