I am in the code for the command , and there it is enough that, IMHO, the simplest / best approach is to simply run the command in a child process. Here is the code I used for this (as an expected promise): sequelize db:migrate sequelize db:migrate
const {exec} = require('child_process');
await new Promise((resolve, reject) => {
const migrate = exec(
'sequelize db:migrate',
{env: process.env},
(err, stdout, stderr) => {
if (err) {
reject(err);
} else {
resolve();
}
}
);
// Forward stdout+stderr to this process
migrate.stdout.pipe(process.stdout);
migrate.stderr.pipe(process.stderr);
});
source
share