Closed joezappie closed 2 years ago
Looking at up.js it appears that migrator.migrationsDir is correct with the scoped directory.
Changing walker.js to File.loadFromFileystem(this.migrationsDir, this.prefix, this.internals) makes it work. This would have to be changed in a lot of places, but is correct?
We found the same problem (in 1.0.0-beta.16, like the OP) - scoped migrations no longer work, it re-runs the migrations at the root for every scoped invocation. We've reverted to 0.11.6 to be able to use this again. We're using MySQL
I've noticed this issue too and it was introduced in version 0.11.12. Unfortunately, this version only seems to be pinned at npm and not listed as a release here?
I'm submitting a...
Current behavior
When trying to use scopes, its not finding the migration files in the scoped directory and is instead running files in the ./migrations folder. This happens with both the CLI and through the API.
Expected behavior
Migrations should be run in the scoped folder.
Minimal reproduction of the problem with instructions
Looking at the code in walker.js up function, its loading the files from the filesystem with File.loadFromFileystem(this.directory, this.prefix, this.internals). "this.directory" is a path to only the migrations directory which I imagine should have the scoped folder name there as well.
Environment
Windows 10 Node v14.16.0 db-migrate: 1.0.0-beta.16 db-migrate-mongodb: 1.5.0