Fixed error on new database creation command when database platform is sqlite

This commit is contained in:
Alejandro Celaya
2019-08-06 20:16:16 +02:00
parent e04838eaa2
commit bc3fc59b1e
2 changed files with 29 additions and 0 deletions

View File

@@ -68,6 +68,10 @@ class CreateDatabaseCommand extends AbstractDatabaseCommand
private function checkDbExists(): void
{
if ($this->regularConn->getDatabasePlatform()->getName() === 'sqlite') {
return;
}
// In order to create the new database, we have to use a connection where the dbname was not set.
// Otherwise, it will fail to connect and will not be able to create the new database
$schemaManager = $this->noDbNameConn->getSchemaManager();