aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Command/InstallCommand.php
diff options
context:
space:
mode:
authorJeremy <jeremy.benoist@gmail.com>2015-02-22 17:18:54 +0100
committerJeremy <jeremy.benoist@gmail.com>2015-02-22 17:18:54 +0100
commit732c2ad8971f427ec196acfac53dad034cefdef4 (patch)
tree70bf2b4c305dfa5171849f7fca5b2b0501062f4e /src/Wallabag/CoreBundle/Command/InstallCommand.php
parent0bf99bb144561525a34a50315b95efd6f543fe35 (diff)
downloadwallabag-732c2ad8971f427ec196acfac53dad034cefdef4.tar.gz
wallabag-732c2ad8971f427ec196acfac53dad034cefdef4.tar.zst
wallabag-732c2ad8971f427ec196acfac53dad034cefdef4.zip
sqlite doesn't support getListDatabasesSQL
Diffstat (limited to 'src/Wallabag/CoreBundle/Command/InstallCommand.php')
-rw-r--r--src/Wallabag/CoreBundle/Command/InstallCommand.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php
index a528c309..ac7583ea 100644
--- a/src/Wallabag/CoreBundle/Command/InstallCommand.php
+++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php
@@ -283,6 +283,17 @@ class InstallCommand extends ContainerAwareCommand
283 throw $exception; 283 throw $exception;
284 } 284 }
285 285
286 // custom verification for sqlite, since `getListDatabasesSQL` doesn't work for sqlite
287 if ('sqlite' == $schemaManager->getDatabasePlatform()->getName()) {
288 $params = $this->getContainer()->get('doctrine.dbal.default_connection')->getParams();
289
290 if (isset($params['path']) && file_exists($params['path'])) {
291 return true;
292 }
293
294 return false;
295 }
296
286 return in_array($databaseName, $schemaManager->listDatabases()); 297 return in_array($databaseName, $schemaManager->listDatabases());
287 } 298 }
288 299