db-generate
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGenerate Database Migrations
生成数据库迁移文件
Generate database migrations for the specified Medusa module.
The user will provide the module name as an argument (e.g., , , ).
brandproductcustom-moduleFor example:
/medusa-dev:db-generate brandUse the Bash tool to execute the command , replacing with the provided argument.
npx medusa db:generate <module-name><module-name>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 to apply the migrations)
npx medusa db:migrate
为指定的Medusa模块生成数据库迁移文件。
用户会提供模块名称作为参数(例如:、、)。
brandproductcustom-module示例:
/medusa-dev:db-generate brand使用Bash工具执行命令 ,将替换为提供的参数。
npx medusa db:generate <module-name><module-name>向用户报告结果,包括:
- 生成迁移文件的模块名称
- 迁移文件名称或位置
- 任何错误或警告
- 后续步骤(运行以应用迁移文件)
npx medusa db:migrate