docs: document links sync command (#8212)

* docs: document links sync command

* small wording fix

* sentence fix
This commit is contained in:
Shahed Nasser
2024-07-22 13:17:53 +03:00
committed by GitHub
parent ac21f35b2c
commit a2d08eb635
3 changed files with 22 additions and 46 deletions
@@ -60,14 +60,16 @@ The `defineLink` function accepts as parameters the link configurations of each
In this example, you define a module link between the `hello` module's `MyCustom` data model and the Product Module's `Product` data model.
### 2. Run Migrations
### 2. Sync Links
Medusa stores links as pivot tables in the database, so you must run migrations after defining a link:
Medusa stores links as pivot tables in the database. So, to reflect your link in the database, run the `links sync` command:
```bash
npx medusa migrations run
npx medusa links sync
```
Use this command whenever you make changes to your links. For example, run this command if you remove your link definition file.
---
## Define a List Link