lib/sync.js
function syncSchema(result, schema) {
  var knex = this.knex;
  return knex.schema.hasTable(schema.tableName)
  .then(function (exists) {
    if (exists) return result;
    return knex.schema.createTable(schema.tableName, defineSchemaTable(schema))
    .then(function () {
      return result.concat([schema]);
    });
  });
}
function syncSchema(result, schema) {
  var knex = this.knex;
  return knex.schema.hasTable(schema.tableName)
  .then(function (exists) {
    if (exists) return result;
    return knex.schema.createTable(schema.tableName, defineSchemaTable(schema))
    .then(function () {
      return result.concat([schema]);
    });
  });
}
function syncSchema ( result , schema ) { var knex = this . knex ; return knex . schema . hasTable ( schema . tableName ) . then ( function ( exists ) { if ( exists ) return result ; return knex . schema . createTable ( schema . tableName , defineSchemaTable ( schema ) ) . then ( function ( ) { return result . concat ( [ schema ] ) ; } ) ; } ) ; }
Synchronize given schema with database.

@param {[Schema]} result - reduce accumulator
@param {Schema} schema
@return {Promise}
Synchronize given schema with database .