X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FCommand%2FInstallCommand.php;h=491c67f9fc99533c7e49ec7cd12cc6a7a883adea;hb=1a0ea1f35adaef86580f6141943a110453372bcf;hp=bba2607d05ae6c5ffd80585dbe268d2d97ffd98f;hpb=1a93ee423b072ec3bcb0c437cbf9b488bdea245c;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index bba2607d..491c67f9 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php @@ -225,7 +225,7 @@ class InstallCommand extends ContainerAwareCommand } /** - * Run a command + * Run a command. * * @param string $command * @param array $parameters Parameters to this command (usually 'force' => true) @@ -266,9 +266,9 @@ class InstallCommand extends ContainerAwareCommand } /** - * Check if the database already exists + * Check if the database already exists. * - * @return boolean + * @return bool */ private function isDatabasePresent() { @@ -299,14 +299,15 @@ class InstallCommand extends ContainerAwareCommand } /** - * Check if the schema is already created + * Check if the schema is already created. + * If we found at least oen table, it means the schema exists. * - * @return boolean + * @return bool */ private function isSchemaPresent() { $schemaManager = $this->getContainer()->get('doctrine')->getManager()->getConnection()->getSchemaManager(); - return $schemaManager->tablesExist(array('entry')); + return count($schemaManager->listTableNames()) > 0 ? true : false; } }