db-generate
एक ही कमांड से Medusa मॉड्यूल के लिए डेटाबेस माइग्रेशन जनरेट करें। निर्दिष्ट Medusa मॉड्यूल के लिए माइग्रेशन फ़ाइलें बनाने हेतु npx medusa db:generate CLI कमांड को रैप करता है। मॉड्यूल का नाम एक आर्गुमेंट के रूप में स्वीकार करता है और माइग्रेशन फ़ाइल का स्थान, त्रुटियाँ, तथा अगले कदमों की रिपोर्ट करता है। जनरेशन के बाद माइग्रेशन लागू करने के लिए स्वचालित रूप से 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)