public function executeMigrate($params = array()) { $option = array_shift($params); if ($option != 'reset') { $migration_date = Config::getPref('migration_date', false); } if (empty($migration_date) && $option != 'reset') { return $this->error('No migration date. If you want to reinstall all the migrations add reset to your command'); } $this->line('migrating database changes since ' . $migration_date); $new_migration_date = date('YmdHi'); foreach (self::_migrations() as $date => $info) { $this->line('Check ' . $date . ' : ' . $info['description']); if ($date > $migration_date) { self::_launch_migration($info, $info['type']); Config::setPref('migration_date', $date); } else { $this->line('DONE'); } } }