$npx -y skills add medusajs/medusa-agent-skills --skill db-generateGenerate database migrations for a Medusa module
| 1 | # Generate Database Migrations |
| 2 | |
| 3 | Generate database migrations for the specified Medusa module. |
| 4 | |
| 5 | The user will provide the module name as an argument (e.g., `brand`, `product`, `custom-module`). |
| 6 | |
| 7 | For example: `/medusa-dev:db-generate brand` |
| 8 | |
| 9 | Use the Bash tool to execute the command `npx medusa db:generate <module-name>`, replacing `<module-name>` with the provided argument. |
| 10 | |
| 11 | Report the results to the user, including: |
| 12 | |
| 13 | - The module name for which migrations were generated |
| 14 | - Migration file name or location |
| 15 | - Any errors or warnings |
| 16 | - Next steps (running `npx medusa db:migrate` to apply the migrations) |