When you use require('sql-migrations').migrate(configuration) instead of run() it does not attach adapter. So it breaks with an error:
..../node_modules/sql-migrations/commands/run-migrations-command.js:4
return adapter.appliedMigrations()
^
TypeError: Cannot read property 'appliedMigrations' of undefined
migrate() command requires adapter instance as a 2nd argument
as well as rollback()
When you use require('sql-migrations').migrate(configuration) instead of run() it does not attach adapter. So it breaks with an error:
..../node_modules/sql-migrations/commands/run-migrations-command.js:4
return adapter.appliedMigrations()
^
TypeError: Cannot read property 'appliedMigrations' of undefined
migrate() command requires adapter instance as a 2nd argument
as well as rollback()