tgriesser/knex — pull request #115 by bendrucker (2013-11-27 18:23:11+00:00)
Title: Fix direct inclusion of Knex instance in migrations

Knex doesn't create actual instances so checking whether a valid Knex client is an `instanceof require('knex')` fails. I'm borrowing the detection logic [from Bookshelf](https://github.com/tgriesser/bookshelf/blob/master/bookshelf.js#L37). Definitely planning to write tests for all this soon, but I can confirm that it works (migrations run) on a real project.