sqlite doesn't support getListDatabasesSQL
This commit is contained in:
parent
0bf99bb144
commit
732c2ad897
@ -6,7 +6,7 @@ parameters:
|
|||||||
database_name: symfony
|
database_name: symfony
|
||||||
database_user: root
|
database_user: root
|
||||||
database_password: ~
|
database_password: ~
|
||||||
database_path: "%kernel.root_dir%/../data/db/poche.sqlite"
|
database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
|
||||||
|
|
||||||
mailer_transport: smtp
|
mailer_transport: smtp
|
||||||
mailer_host: 127.0.0.1
|
mailer_host: 127.0.0.1
|
||||||
|
@ -283,6 +283,17 @@ class InstallCommand extends ContainerAwareCommand
|
|||||||
throw $exception;
|
throw $exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// custom verification for sqlite, since `getListDatabasesSQL` doesn't work for sqlite
|
||||||
|
if ('sqlite' == $schemaManager->getDatabasePlatform()->getName()) {
|
||||||
|
$params = $this->getContainer()->get('doctrine.dbal.default_connection')->getParams();
|
||||||
|
|
||||||
|
if (isset($params['path']) && file_exists($params['path'])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return in_array($databaseName, $schemaManager->listDatabases());
|
return in_array($databaseName, $schemaManager->listDatabases());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ class InstallCommandTest extends WallabagTestCase
|
|||||||
|
|
||||||
$tester = new CommandTester($command);
|
$tester = new CommandTester($command);
|
||||||
$tester->execute(array(
|
$tester->execute(array(
|
||||||
'command' => $command->getName()
|
'command' => $command->getName(),
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->assertContains('Step 1 of 4. Checking system requirements.', $tester->getDisplay());
|
$this->assertContains('Step 1 of 4. Checking system requirements.', $tester->getDisplay());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user