how to drop and re-run migrations with db-migrate
<p>I am trying to seed the db before I run all my tests. So I have created a new file <code>bootstrapTest.js</code> and included it in my test source file like this <code>gulp.src(['test/bootstrapTest.js', 'test/**/*.js']</code></p>

<p><code>bootstrapTest.js</code> now needs to reset the database and re-run the migrations and seed the data. So I create a child process and let it run a shell script (<code>seed.sh</code>). </p>

<pre><code>`const exec = require('child_process').exec;
exec('./seed.sh', 
    {env: {database__host: 'localhost', database__user: 'username', 
    database__port: 3306, database__password: 'password'}}, function 
    (error, stdout, stderr) { ...
}`
</code></pre>

<p>and this is how my <code>seed.sh</code> looks like </p>

<p><code>
 #!/bin/bash
./node_modules/.bin/db-migrate reset --env test
echo '## Database truncated'
./node_modules/.bin/db-migrate up --env test
echo '## Database migrated'
</code></p>

<p>In the output on the console, I only see the echo output and not the commands that are run. I have validated that indeed db-migrate is not running.</p>

<p>Any idea why <code>db-migrate</code> is not running? When I run this manually from my zsh, it works fine.</p>