]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Command/InstallCommand.php
Fix database already exist detection
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Command / InstallCommand.php
index 808baaf68ec7257270d620d1028cfa763ce59377..865a73e1db215c56fd137757d4d8643e8a6df507 100644 (file)
@@ -283,10 +283,16 @@ class InstallCommand extends ContainerAwareCommand
         try {
             $schemaManager = $connection->getSchemaManager();
         } catch (\Exception $exception) {
+            // mysql & sqlite
             if (false !== strpos($exception->getMessage(), sprintf("Unknown database '%s'", $databaseName))) {
                 return false;
             }
 
+            // pgsql
+            if (false !== strpos($exception->getMessage(), sprintf('database "%s" does not exist', $databaseName))) {
+                return false;
+            }
+
             throw $exception;
         }