db-generate
作成者: medusajs
単一のコマンドでMedusaモジュールのデータベースマイグレーションを生成します。npx medusa db:generate CLIコマンドをラップして、指定されたMedusaモジュールのマイグレーションファイルを作成します。モジュール名を引数として受け取り、マイグレーションファイルの場所、エラー、次のステップを報告します。生成後にnpx medusa db:migrateを実行してマイグレーションを適用することを自動的に提案します。
npx skills add https://github.com/medusajs/medusa-agent-skills --skill db-generateGenerate 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)