'how can i specify the migrations directory for typeorm CLI
After the new typeorm release a have some troubles to work with migrations.
Some time ago i was using that code and it work
entities: ['./src/modules/**/infra/typeorm/entities/*.ts'],
migrations: ['./src/shared/infra/typeorm/migrations/*.ts'],
cli: {
migrationsDir: './src/shared/infra/typeorm/migrations'
}
But now i cant specify the cli property. To create a new migrations i have to specify the entire migration path
npm run typeorm migration:create ./src/database/migrations -n SomeTest
is there another way to do that without specify the entire path?
Solution 1:[1]
As of submitting this answer, there seems not to be a way around it. You can specify the path when creating new migration just as you have done
typeorm migration:create -n UserMigration -d src/migrations
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | emeritusdeveloper |