title: "no such table: users" when testing and using Bookshelf / Knex
body: <p>I'm trying to run a simple test using Mocha and my Bookshelf / Knex model, however I'm getting the error "Unhandled rejection Error: SQLITE_ERROR: no such table: users". Note that I'm trying to use in memory SQLite.</p>
  
  <p>Here's my Knexfile:</p>
  
  <pre><code>module.exports = {
  
    development: {
      client: 'sqlite3',
      connection: {
        filename: ':memory:'
      }
    },
  
    test: {
      client: 'mysql',
      connection: {
        host: '172.18.0.2',
        user: 'root',
        password: '',
        database: 'staging_db',
        charset  : 'utf8'
      },
      pool: {
        min: 2,
        max: 10
      },
      migrations: {
        tableName: 'knex_migrations'
      }
    },
  
    production: {
      client: 'mysql',
      connection: {
        host: process.env.DB_HOST || 'localhost',
        user: process.env.DB_USER || 'usr',
        password: process.env.DB_PWD || '',
        database: process.env.DB_NAME || 'db',
        charset  : 'utf8'
      },
      pool: {
        min: 2,
        max: 10
      },
      migrations: {
        tableName: 'knex_migrations'
      }
    }
  
  };
  </code></pre>
  
  <p>Database.js:</p>
  
  <pre><code>var config      = require('../knexfile.js');  
  var env         = process.env.NODE_ENV || 'development';  
  var knex        = require('knex')(config[env]);
  
  knex.migrate.latest([config]);
  
  let bookshelf = require('bookshelf')(knex);
  
  bookshelf.plugin('registry'); // Resolve circular dependencies with relations
  
  // Export bookshelf for use elsewhere
  module.exports = bookshelf;
  </code></pre>
  
  <p>And my User model:</p>
  
  <pre><code>let bookshelf = require('../config/database');
  
  require('./role');
  
  var User = bookshelf.Model.extend({
      tableName: 'users',
      role: function() {
          return this.hasOne(Role);
      }
  });
  
  module.exports = bookshelf.model('user', User);
  </code></pre>
  
  <p>And my test:</p>
  
  <pre><code>var User = require('../../models/user'),
      chai = require('chai'),
      expect = chai.expect;
  
  describe('User model', function () {
  
      it('should return empty set before adding anything', () =&gt; {
          expect(User.collection().count()).to.equal(0); 
      });
  
  });
  </code></pre>
  
  <p>Am I missing something?</p>
  
  <h2>UPDATE</h2>
  
  <p>Adding the migration file:</p>
  
  <pre><code>exports.up = function(knex, Promise) {
    return knex.schema.createTable('roles', function (table) {
          //this creates an id column as auto incremented primary key
          table.increments();
          table.string('description', 45).notNullable();
      })
      .createTable('users', function (table) {
          table.increments();
          table.string('name', 60);
          table.string('password', 45);
          table.integer('role_id').unsigned();
          table.foreign('role_id').references('roles.id');
      });
  };
  
  exports.down = function(knex, Promise) {
    return knex.schema.dropTable('users').dropTable('roles');
  };
  </code></pre>