docs: document links sync command (#8212)

* docs: document links sync command

* small wording fix

* sentence fix
This commit is contained in:
Shahed Nasser authored and GitHub committed 2024-07-22 13:17:53 +03:00
1 parent ac21f35b2c
commit a2d08eb635
3 files changed
+22 -46

No files matched your search

@@ -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