You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using --from or --to cli options a Migration prefix gets appended to the beginning of the given file name. CLI crashes when the previously mentioned options are used with custom migration names.
Error: Unable to find migration: Migration20200928151522-migration
at Umzug.<anonymous> (mikro-orm-graphql-example-master/node_modules/umzug/lib/index.js:536:41)
at Umzug.tryCatcher (mikro-orm-graphql-example-master/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (mikro-orm-graphql-example-master/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (mikro-orm-graphql-example-master/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (mikro-orm-graphql-example-master/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (mikro-orm-graphql-example-master/node_modules/bluebird/js/release/promise.js:729:18)
at Promise._fulfill (mikro-orm-graphql-example-master/node_modules/bluebird/js/release/promise.js:673:18)
at Promise._resolveCallback (mikro-orm-graphql-example-master/node_modules/bluebird/js/release/promise.js:466:57)
at Promise._settlePromiseFromHandler (mikro-orm-graphql-example-master/node_modules/bluebird/js/release/promise.js:559:17)
at Promise._settlePromise (mikro-orm-graphql-example-master/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (mikro-orm-graphql-example-master/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (mikro-orm-graphql-example-master/node_modules/bluebird/js/release/promise.js:729:18)
at Promise._fulfill (mikro-orm-graphql-example-master/node_modules/bluebird/js/release/promise.js:673:18)
at Promise._resolveCallback (mikro-orm-graphql-example-master/node_modules/bluebird/js/release/promise.js:466:57)
at Promise._settlePromiseFromHandler (mikro-orm-graphql-example-master/node_modules/bluebird/js/release/promise.js:559:17)
at Promise._settlePromise (mikro-orm-graphql-example-master/node_modules/bluebird/js/release/promise.js:604:18)
To Reproduce
Steps to reproduce the behavior:
Use a custom migration file name generator (Configuration.migrations.fileName). E.g.: (timestamp: string) => '${timestamp}-migration'
Generate at least 2 migrations. (migration:create)
Apply the migrations. (migration:up)
Revert to the first migration. (migration:down --to [first-migration.ts])
Expected behavior
Migrations should be reverted based on the given --from, --to options.
Additional context
Versions
Dependency
Version
node
14.11.0
typescript
3.9.7
mikro-orm
4.0.5
pg
8.2.1
The text was updated successfully, but these errors were encountered:
Describe the bug
When using
--from
or--to
cli options aMigration
prefix gets appended to the beginning of the given file name. CLI crashes when the previously mentioned options are used with custom migration names.Migrator.ts#L139
Stack trace
To Reproduce
Steps to reproduce the behavior:
Configuration.migrations.fileName
). E.g.:(timestamp: string) => '${timestamp}-migration'
migration:create
)migration:up
)migration:down --to [first-migration.ts]
)Expected behavior
Migrations should be reverted based on the given
--from
,--to
options.Additional context
Versions
The text was updated successfully, but these errors were encountered: