lib/populate.js
function populateSchema(result, schema) {
  var knex = this.knex;
  return knex.schema.hasTable(schema.tableName)
  .then(function (exists) {
    if (! exists || ! schema.populate) return result;
    return schema.populate(knex)
    .then(function () {
      return result.concat([schema]);
    });
  });
}
function populateSchema(result, schema) {
  var knex = this.knex;
  return knex.schema.hasTable(schema.tableName)
  .then(function (exists) {
    if (! exists || ! schema.populate) return result;
    return schema.populate(knex)
    .then(function () {
      return result.concat([schema]);
    });
  });
}
function populateSchema ( result , schema ) { var knex = this . knex ; return knex . schema . hasTable ( schema . tableName ) . then ( function ( exists ) { if ( ! exists || ! schema . populate ) return result ; return schema . populate ( knex ) . then ( function ( ) { return result . concat ( [ schema ] ) ; } ) ; } ) ; }
Populate schema table with schema data.

@param {[Schema]} result - reduce accumulator
@param {Schema} schema
@return {Promise}
Populate schema table with schema data .