Release 1.6.1 (#1282)
This commit is contained in:
@@ -136,12 +136,6 @@ final class InstallCommand extends Command
|
||||
|
||||
protected function createDatabase(SymfonyStyle $io, InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
if (!$this->connection->isConnected() && !$this->connection->connect()) {
|
||||
throw new \Exception(
|
||||
sprintf('Database connection could not be established: %s', $this->connection->getDatabase())
|
||||
);
|
||||
}
|
||||
|
||||
if ($this->connection->isConnected()) {
|
||||
$io->note(sprintf('Database is existing and connection could be established'));
|
||||
|
||||
@@ -153,7 +147,11 @@ final class InstallCommand extends Command
|
||||
}
|
||||
|
||||
$command = $this->getApplication()->find('doctrine:database:create');
|
||||
$command->run(new ArrayInput([]), $output);
|
||||
$result = $command->run(new ArrayInput(['--if-not-exists' => true]), $output);
|
||||
|
||||
if (0 !== $result) {
|
||||
throw new \Exception('Failed creating database. Check your credentials in DATABASE_URL');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user