PHRAS-288 Check if storage engines is available

This commit is contained in:
Nicolas Le Goff
2015-01-12 16:42:38 +01:00
parent 0275ede43c
commit 99bc7d0e65
6 changed files with 53 additions and 3 deletions

View File

@@ -618,6 +618,10 @@ class databox extends base
{
$connection = new connection_pdo('test', $host, $port, $user, $password, $dbname, array(), $app['debug']);
if (false === $connection->supportInnoDB()) {
throw new \Exception('Database server does not support InnoDB storage engine');
}
$conn = $app['phraseanet.appbox']->get_connection();
$sql = 'SELECT MAX(ord) as ord FROM sbas';
$stmt = $conn->prepare($sql);