lib/sync.js
function sync(schemas) {
  var resolver = new Resolver(schemas);
  // Reduce force sequential execution.
  return Promise.resolve(Promise.reduce(resolver.resolve(), syncSchema.bind(this), []))
  .tap(function () {
    var knex = this.knex;
    return Promise.map(schemas || [], function(schema) {
      return (schema.postBuild || _.noop)(knex);
    });
  }.bind(this));
}
function sync(schemas) {
  var resolver = new Resolver(schemas);
  // Reduce force sequential execution.
  return Promise.resolve(Promise.reduce(resolver.resolve(), syncSchema.bind(this), []))
  .tap(function () {
    var knex = this.knex;
    return Promise.map(schemas || [], function(schema) {
      return (schema.postBuild || _.noop)(knex);
    });
  }.bind(this));
}
function sync ( schemas ) { var resolver = new Resolver ( schemas ) ; // Reduce force sequential execution. return Promise . resolve ( Promise . reduce ( resolver . resolve ( ) , syncSchema . bind ( this ) , [ ] ) ) . tap ( function ( ) { var knex = this . knex ; return Promise . map ( schemas || [ ] , function ( schema ) { return ( schema . postBuild || _ . noop ) ( knex ) ; } ) ; } . bind ( this ) ) ; }
Synchronize given schemas with database. If it exists, it calls `postBuild` afterwards

@param {[Schemas]} schemas
@return {Promise}
Synchronize given schemas with database . If it exists it calls postBuild afterwards