Exemplo n.º 1
0
 /**
  * @param $databaseName
  * @param  \PDO $pdo
  * @return bool
  */
 public function continueWithExistingTables($databaseName, \PDO $pdo)
 {
     $service = new DatabaseService($pdo);
     $tableCount = $service->getTableCount();
     if ($tableCount == 0) {
         return true;
     }
     $question = new ConfirmationQuestion(sprintf('The database %s already contains %s tables. Continue? (yes/no) [no]', $databaseName, $tableCount), false);
     return $this->askQuestion($question);
 }