docs: function runnerFactory(direction, migrations) {
        // Override the `execute` method for the migration helpers with a version
        // that queues the intended query and immediately moves on. in a migration
        // we want to handle the queries in parallel.
        helpers.execute = function execute(sql, callback) {
          function cb(callback) {
            QueryRunner.expecting--;
            return callback;
          }
          QueryRunner.expecting++;
          return QueryRunner.enqueue([sql, cb(callback)]);
        };
  
        return function runMigration(version, callback) {
          var key = lookup(version, migrations);
  
          if (!key) {
            var error = new Error('Could not find migration with the following lookup parameter: ' + _.quote(version));
            error.name = 'MigrationNotFound';
            return callback(error);
          }
          
          migrations[key][direction].bind(helpers)(helpers);
          QueryRunner.flush();
          QueryRunner.once('done', function (err) {
            // #TODO: pass back an error saying
            // - the version of the migration
            // - what went wrong
            // - exactly which query failed?
            if (err) return callback(err);
            var ver = (direction === 'up')
              ? key
              : previous(version, migrations);
            this.updateSchemaVersion(ver, callback);
          }.bind(this));
  
        };
      }