docs: fix mikro-orm imports from framework (#13885)
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user