docs: latest fixes (#7951)
This commit is contained in:
@@ -63,24 +63,14 @@ A migration is a class created in a TypeScript or JavaScript file under a module
|
||||
import path from "path"
|
||||
import MyCustom from "./models/my-custom"
|
||||
|
||||
export default defineMikroOrmCliConfig({
|
||||
export default defineMikroOrmCliConfig("hello", {
|
||||
entities: [MyCustom] as any[],
|
||||
databaseName: "medusa-hello",
|
||||
migrations: {
|
||||
path: path.join(__dirname, "migrations"),
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
<Note title="Important">
|
||||
|
||||
The `databaseName`'s value is only used to generate the migrations. So, make sure it:
|
||||
|
||||
1. Is unique to the module. Two modules shouldn't have the same database name, and it shouldn't be the same as the Medusa application.
|
||||
2. Doesn't change between migrations, as that causes inconsistencies between the migrations.
|
||||
|
||||
</Note>
|
||||
|
||||
2. Run the following command in the root directory of your Medusa application:
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user