fix sqlite installer (#1283)
This commit is contained in:
@@ -146,8 +146,13 @@ final class InstallCommand extends Command
|
||||
throw new \Exception('Skipped database creation, aborting installation');
|
||||
}
|
||||
|
||||
$options = [];
|
||||
if ($this->connection->getDatabasePlatform()->getName() !== 'sqlite') {
|
||||
$options = ['--if-not-exists' => true];
|
||||
}
|
||||
|
||||
$command = $this->getApplication()->find('doctrine:database:create');
|
||||
$result = $command->run(new ArrayInput(['--if-not-exists' => true]), $output);
|
||||
$result = $command->run(new ArrayInput($options), $output);
|
||||
|
||||
if (0 !== $result) {
|
||||
throw new \Exception('Failed creating database. Check your credentials in DATABASE_URL');
|
||||
|
||||
Reference in New Issue
Block a user