About db-generate
A skill for Medusa developers that runs the database migration generation command for a specified module and reports the results and suggested next step.
Key features
- 01Generate migrations for a named module
- 02Report migration file location
- 03Surface errors and warnings
- 04Suggest applying migrations
Use cases
- 01Creating migrations for a Medusa module
- 02Checking generated migration output
- 03Preparing to apply database migrations
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ medusajs/ medusa-agent-skills --skill db-generateAfter installing, type/db-generatein Claude Code to confirm it loaded.
Details
From the project READMEGenerate Database Migrations
Generate database migrations for the specified Medusa module.
The user will provide the module name as an argument (e.g., brand, product, custom-module).
For example: /medusa-dev:db-generate brand
Use the Bash tool to execute the command npx medusa db:generate <module-name>, replacing <module-name> with the provided argument.
Report the results to the user, including:
- The module name for which migrations were generated
- Migration file name or location
- Any errors or warnings
- Next steps (running
npx medusa db:migrateto apply the migrations)
Comments
Markdown supported