Closed bassochette closed 2 years ago
Looking at the code, this is already possible:
You'll need to add a sample-migration.ts
in your migrations directory and it will use it to create future migration files.
Now that I know it has this name, I also found it in the documentation: https://github.com/seppevs/migrate-mongo#overriding-the-sample-migration
Maybe if it was called something with template
in the name I would have found it sooner (and you too...).
Looking at the code, this is already possible:
You'll need to add a
sample-migration.ts
in your migrations directory and it will use it to create future migration files.Now that I know it has this name, I also found it in the documentation: https://github.com/seppevs/migrate-mongo#overriding-the-sample-migration
Maybe if it was called something with
template
in the name I would have found it sooner (and you too...).
Nice catch, thanks a lot. I'll try that asap :)
I'll close the issue since. thanks for you help @jamiter
Is your feature request related to a problem? Please describe. While creating migrations using typescript, I end up with untyped function and I need to type them every time.... That's kind of annoying
Describe the solution you'd like As a user I'd like to pass a parameter to provide a custom template
mongo-migrate create <migration name> --template migrations-utils/template.ts