TryGhost/Ghost — pull request #3213 by hswolff (2014-07-07 03:32:17+00:00)
Title: Preparation for lazy loading of models

These commits work towards #2170. They're a step towards that issue's completion as it's a large and complex change So I'm going to break it up into atomic pieces that can be merged in as we go.

The two commit messages tell the full story:

* Move creation of knex instance to config module

* Only reference model properties through the models module.
This frees us up to enforce one single point of access, thus paving
the way towards allowing us to initialize the models at are request,
and not when it's require().

This is in two commits for now for easy reviewing.

If needed I can and will squash them into one commit when approved.