bin/captain.js
function syncdb() {
  function _syncdb(drop) {
    var db = require('captain-core/lib/db');

    db.syncDB({
      complete: function(err) {
        if(err) {
          terminal.abort('Failed syncing', err);
        } else {
          terminal.exit('\nAll done\n\n');
        }
      },
      progress: function(script, file) {
        console.log('Executing:', file);
        if(program.verbose) {
          console.log('========\n%s\n', script);
        }
      },
      drop: drop
    });
  }

  if(program.drop) {
    if(!program.force) {
      program.prompt('This will drop all databases, are you sure you want to proceed? (y/N): ', function(answer) {
        if(!!answer.match(/y|yes|arrr/i)) {
          fn(true);
        } else {
          terminal.exit('Exiting.');
        }
      });
    } else {
      _syncdb(true);
    }
  } else {
    _syncdb(false);
  }
}
function syncdb() {
  function _syncdb(drop) {
    var db = require('captain-core/lib/db');

    db.syncDB({
      complete: function(err) {
        if(err) {
          terminal.abort('Failed syncing', err);
        } else {
          terminal.exit('\nAll done\n\n');
        }
      },
      progress: function(script, file) {
        console.log('Executing:', file);
        if(program.verbose) {
          console.log('========\n%s\n', script);
        }
      },
      drop: drop
    });
  }

  if(program.drop) {
    if(!program.force) {
      program.prompt('This will drop all databases, are you sure you want to proceed? (y/N): ', function(answer) {
        if(!!answer.match(/y|yes|arrr/i)) {
          fn(true);
        } else {
          terminal.exit('Exiting.');
        }
      });
    } else {
      _syncdb(true);
    }
  } else {
    _syncdb(false);
  }
}
function syncdb ( ) { function _syncdb ( drop ) { var db = require ( 'captain-core/lib/db' ) ; db . syncDB ( { complete : function ( err ) { if ( err ) { terminal . abort ( 'Failed syncing' , err ) ; } else { terminal . exit ( '\nAll done\n\n' ) ; } } , progress : function ( script , file ) { console . log ( 'Executing:' , file ) ; if ( program . verbose ) { console . log ( '========\n%s\n' , script ) ; } } , drop : drop } ) ; } if ( program . drop ) { if ( ! program . force ) { program . prompt ( 'This will drop all databases, are you sure you want to proceed? (y/N): ' , function ( answer ) { if ( ! ! answer . match ( / y|yes|arrr / i ) ) { fn ( true ) ; } else { terminal . exit ( 'Exiting.' ) ; } } ) ; } else { _syncdb ( true ) ; } } else { _syncdb ( false ) ; } }
Usage: captain syncdb [--force]

Synchronize all models
Usage : captain syncdb [ -- force ]