the problem is it fails because it's adding the test directory relative path to the end of the migration create directory.
I looked in the db-migrate code and this is where it's setting title in createMigrationDir:
internals.argv.title = folder[folder.length - 2] || folder[0];
So I end up with this error because the title arg is appending my test folder's path to the end /integration/**/:
no such file or directory, open '/Users/daveschinkel/code/projects/myProjeect/src/LocalDB/migrations/test/integration/**/20220223063816-**.js'
the right path is /Users/daveschinkel/code/projects/myProjeect/src/LocalDB/migrations/test
I am trying to run a migration to initially create a .sql file from my test like so:
createSQLAndMigrationFile
exists inside my Migrate.ts which sets up db-migrate as such:the problem is it fails because it's adding the test directory relative path to the end of the migration create directory.
I looked in the db-migrate code and this is where it's setting title in
createMigrationDir
:internals.argv.title = folder[folder.length - 2] || folder[0];
So I end up with this error because the title arg is appending my test folder's path to the end
/integration/**/
:no such file or directory, open '/Users/daveschinkel/code/projects/myProjeect/src/LocalDB/migrations/test/integration/**/20220223063816-**.js'
the right path is
/Users/daveschinkel/code/projects/myProjeect/src/LocalDB/migrations/test