There are two ways to create a migration file: create and write its content manually, or create and generate its content.
If you're creating a custom entity, then it's recommended to generate the migration file. However, if you're extending an entity from Medusa's core, then you should create and write the migration manually.
Option 2: Write Migration File
With this option, you'll use Typeorm's CLI tool to create the migration file, but you'll write the content yourself.
Run the following command in the root directory of your Medusa backend project:
npx typeorm migration:create src/migrations/PostCreate
Watch video how to create a Migration using Typeorm in Medusa. online without registration, duration hours minute second in high quality. This video was added by user ZeeCoding 10 March 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 187 once and liked it 3 people.