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
directory: __dirname + '/db/migrations'
directory: __dirname + '/db/seeds/development'
var config = require('../knexfile.js');
var env = 'development';
var knex = require('knex')(config[env]);
module.exports = knex;
Using environment: development
Error: The migration directory is corrupt, the following files are missing: 20161110130954_auth_level.js
You had to rollback a migration (
knex migrate:rollback) before deleting the file, I guess what you can do is:
Reference here https://github.com/tgriesser/knex/issues/1569