docs: added directory structure documentation (#4612)
* docs: added directory structure documentation * improvements
This commit is contained in:
@@ -122,8 +122,8 @@ npm run build
|
||||
|
||||
Then, run the `migration` command:
|
||||
|
||||
```bash npm2yarn
|
||||
medusa migrations run
|
||||
```bash
|
||||
npx @medusajs/medusa-cli migrations run
|
||||
```
|
||||
|
||||
You should see that your migration have executed.
|
||||
|
||||
@@ -108,8 +108,8 @@ npm run build
|
||||
|
||||
Then, run the following command to migrate your changes to the database:
|
||||
|
||||
```bash npm2yarn
|
||||
medusa migrations run
|
||||
```bash
|
||||
npx @medusajs/medusa-cli migrations run
|
||||
```
|
||||
|
||||
You should see that your migration was executed, which means your changes were reflected in the database schema.
|
||||
|
||||
@@ -68,6 +68,14 @@ If you want to remove a property from the `metadata` object, you can pass the `m
|
||||
|
||||
---
|
||||
|
||||
## What are Repositories
|
||||
|
||||
Repositories provide generic helper methods for entities. For example, a `list` method to retrieve all entities with pagination, or `retrieve` to retrieve a single entity record.
|
||||
|
||||
Repostories are [Typeorm repositories](https://typeorm.io/working-with-repository), so you can refer to Typeorm's documentation on all available methods.
|
||||
|
||||
---
|
||||
|
||||
## Custom Development
|
||||
|
||||
Developers can create custom entities in the Medusa backend, a plugin, or in a module, then ensure it reflects in the database using a migration.
|
||||
|
||||
Reference in New Issue
Block a user