How to generate migrations for custom module in v2 #10600
Unanswered
TimmyBravo
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm currently trying to setup a monorepo for building custom modules in Medusa v2. I've looked at the structure of the built-in modules like product, order etc and have gotten everything to work as expected except for migrations.
How would I go about generating migrations from the models I've created? I was able to create them using npx medusa db:generate but then they landed in the dist folder of the module and I want it to be stored in src so they'll be added to the repo etc. I've tried mimicking the
"migration:create": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts medusa-mikro-orm migration:create"
command in the product module but am unable to get it working.What's the correct way to do this?
Beta Was this translation helpful? Give feedback.
All reactions