db-generate
โดย medusajs
สร้างการย้ายฐานข้อมูลสำหรับโมดูล Medusa ด้วยคำสั่งเดียว ครอบคลุมคำสั่ง CLI npx medusa db:generate เพื่อสร้างไฟล์การย้ายสำหรับโมดูล 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)