/** * Creates the database schema for the given array of ClassMetadata instances. * * @throws ToolsException * @param array $classes * @return void */ public function createSchema(array $classes) { $createSchemaSql = $this->getCreateSchemaSql($classes); $conn = $this->em->getConnection(); foreach ($createSchemaSql as $sql) { try { $conn->executeQuery($sql); } catch (\Exception $e) { throw ToolsException::schemaToolFailure($sql, $e); } } }