docs: add instructions on how to roll back a migration (#9870)

This commit is contained in:
Shahed Nasser
2024-11-10 22:43:31 +01:00
committed by GitHub
parent 094971775b
commit e94f35458c

View File

@@ -68,3 +68,21 @@ npx medusa db:migrate
```
This reflects the changes in the database as implemented in the migration's `up` method.
---
## Rollback the Migration
To rollback or revert the last migration you ran for a module, run the following command:
```bash
npx medusa db:rollback helloModuleService
```
This rolls back the last ran migration on the Hello Module.
---
## More Database Commands
To learn more about the Medusa CLI's database commands, refer to [this CLI reference](!resources!/medusa-cli/commands/db).