docs: added dividers + see also section (#2899)

This commit is contained in:
Shahed Nasser
2022-12-26 15:52:08 +02:00
committed by GitHub
parent b0e5769e27
commit b0ebfd6bcf
100 changed files with 1047 additions and 291 deletions
@@ -20,12 +20,16 @@ You can alternatively use Typeorm's `generate` command to generate a Migration f
:::
---
## Write Migration File
The migration file contains the necessary commands to create the database columns, foreign keys, and more.
You can learn more about writing the migration file in You can learn more about writing migrations in [Typeorms Documentation](https://typeorm.io/migrations).
---
## Build Files
Before you can run the migrations you need to run the build command to transpile the TypeScript files to JavaScript files:
@@ -34,6 +38,8 @@ Before you can run the migrations you need to run the build command to transpile
npm run build
```
---
## Run Migration
The last step is to run the migration with the command detailed earlier
@@ -44,6 +50,8 @@ medusa migrations run
If you check your database now you should see that the change defined by the migration has been applied successfully.
---
## Whats Next
- Learn more about [setting up your development server](../../../tutorial/0-set-up-your-development-environment.mdx).
- [Set up your development server](../../../tutorial/0-set-up-your-development-environment.mdx).
@@ -22,6 +22,8 @@ Migrations are used to apply changes to the database schema. However, there are
:::
---
## How to Run Migrations
Migrations in Medusa can be done in one of two ways:
@@ -48,7 +50,9 @@ npm run seed
This will use the underlying `seed` command provided by Medusa's CLI to seed your database with data from the file `data/seed.json` on your Medusa server.
## What's Next
---
- Learn [how to create a migration](index.md)
- Learn more about [setting up your development server](../../../tutorial/set-up-your-development-environment).
## See Also
- [Create a migration](index.md)
- [Set up your development environment](../../../tutorial/set-up-your-development-environment)