mcpField
D
db-generate

db-generate

github.com/medusajsData & databases2343.4k installsUpdated 1w ago
Repository

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

  1. 01Generate migrations for a named module
  2. 02Report migration file location
  3. 03Surface errors and warnings
  4. 04Suggest applying migrations

Use cases

  1. 01Creating migrations for a Medusa module
  2. 02Checking generated migration output
  3. 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-generate

After installing, type/db-generatein Claude Code to confirm it loaded.

Details

From the project README

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)

Comments

Markdown supported