Removing Migrations With Knex.js In My Node.js Application : <p>I am trying to get knex working in my node.js application. I was following a tutorial and at some point created a table but could not repeat the process. I removed the table and deleted all the migrations folders. At tis point I started over but after creating a new migration and then running <code>knex migrate:latest</code> I get an error saying the migration directory is corrupt because the original migration I had is missing. </p>

<p>I was under the impression that if the file is missing it should not know it was ever there. </p>

<p>What is the proper way to remove a migration from my project?</p>

<p>knexfile.js</p>

<pre><code> development: {
    client: 'pg',
    connection: {
    host: '127.0.0.1',
    user:     'postgres',
    password: 'password',
    database: 'myDatabase'
    },
     pool: {
      min: 10,
      max: 20
    },
    migrations: {
      directory: __dirname + '/db/migrations'
    },
    seeds: {
      directory: __dirname + '/db/seeds/development'
    }
</code></pre>

<p>db.js </p>

<pre><code>var config      = require('../knexfile.js');  
var env         = 'development';  
var knex        = require('knex')(config[env]);

module.exports = knex;
console.log('Getting knex');
knex.migrate.latest([config]); 
console.log('Applying migration...');
</code></pre>

<p>Running this gives error,</p>

<pre><code>knex migrate:latest

Using environment: development
Error: The migration directory is corrupt, the following files are missing: 20161110130954_auth_level.js
</code></pre>

<p>but this migration does not exist because I deleted it.</p>
