/**
  * Execute this command.
  *
  * @throws \RuntimeException
  * @return int|void
  */
 protected function doExecute()
 {
     $model = new SchemaModel();
     $path = $model->backupPath;
     if (file_exists($path) && !$this->getOption('y')) {
         $prompter = new BooleanPrompter('Are you sure you want to restore? [Y/n]: ');
         if (!$prompter->ask()) {
             $this->out('cancelled.');
             return;
         }
     }
     if (!file_exists($path)) {
         throw new \RuntimeException('Backup file not exists.');
     }
     $this->out()->out('Restoring...');
     $model->restore();
     $state = $model->getState();
     $queries = $state->get('import.queries');
     $this->out()->out(sprintf('Restore success, %s queries executed.', $queries));
     return;
 }