docs: fix mikro-orm imports from framework (#13885)

This commit is contained in:
Shahed Nasser
2025-10-28 18:27:34 +02:00
committed by GitHub
parent 0244f029aa
commit 540ae996ff
22 changed files with 84 additions and 84 deletions
@@ -44,7 +44,7 @@ As of [Medusa v2.11.0](https://github.com/medusajs/medusa/releases/tag/v2.11.0),
</Note>
```ts title="src/modules/blog/migrations/Migration202507021059_create_author.ts"
import { Migration } from "@medusajs/framework/@mikro-orm/migrations"
import { Migration } from "@medusajs/framework/mikro-orm/migrations"
export class Migration202507021059 extends Migration {
@@ -59,7 +59,7 @@ export class Migration202507021059 extends Migration {
}
```
The migration class in the file extends the `Migration` class imported from `@medusajs/framework/@mikro-orm/migrations`. In the `up` and `down` method of the migration class, you use the `addSql` method provided by MikroORM's `Migration` class to run PostgreSQL syntax.
The migration class in the file extends the `Migration` class imported from `@medusajs/framework/mikro-orm/migrations`. In the `up` and `down` method of the migration class, you use the `addSql` method provided by MikroORM's `Migration` class to run PostgreSQL syntax.
In the example above, the `up` method creates the table `author`, and the `down` method drops the table if the migration is reverted.