Skip to content

db-generate

Generate database migrations for a Medusa module

3,330
installs
0 up / 0 down, score 0.00
votes
234
repo stars
Updated
less than a month ago
In the catalog since
1 Oct 2026
From
medusajs/medusa-agent-skills
Get it through your agent npx skills add medusajs/medusa-agent-skills@db-generate

Skill instructions

Rendered from the published SKILL.md, 17 lines.

Generate 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:migrate to apply the migrations)