diff --git a/www/apps/book/app/basics/data-models/page.mdx b/www/apps/book/app/basics/data-models/page.mdx index d09cbac1c5..9eff644021 100644 --- a/www/apps/book/app/basics/data-models/page.mdx +++ b/www/apps/book/app/basics/data-models/page.mdx @@ -58,12 +58,13 @@ A migration is a class created in a TypeScript or JavaScript file under a module 1. Create the file `src/modules/hello/migrations-config.ts` with the following content: - ```ts highlights={[["7", '"medusa-hello"', "Use any database name relevant for your module."]]} + ```ts import { defineMikroOrmCliConfig } from "@medusajs/utils" import path from "path" import MyCustom from "./models/my-custom" + import { HELLO_MODULE } from "." - export default defineMikroOrmCliConfig("hello", { + export default defineMikroOrmCliConfig(HELLO_MODULE, { entities: [MyCustom] as any[], migrations: { path: path.join(__dirname, "migrations"), diff --git a/www/apps/book/app/basics/modules-and-services/page.mdx b/www/apps/book/app/basics/modules-and-services/page.mdx index 44f3a3ed0f..f370a383ed 100644 --- a/www/apps/book/app/basics/modules-and-services/page.mdx +++ b/www/apps/book/app/basics/modules-and-services/page.mdx @@ -48,7 +48,7 @@ A module must have an `index.ts` file in its root directory that exports its def For example, create the file `src/modules/hello/index.ts` with the following content: -```ts title="src/modules/hello/index.ts" highlights={[["5", "", "The main service of the module."]]} +```ts title="src/modules/hello/index.ts" highlights={[["7", "", "The main service of the module."]]} import HelloModuleService from "./service" import { Module } from "@medusajs/utils"