public function installDatabase($email, $verbose)
    {
        $em = $this->getEntityManager();
        $tool = new SchemaTool($em);
        if ($verbose) {
            print_r("Installing database.\n");
        }
        $classes = $this->getEntityMetaData($em);

        // Rebuild the schema
        if ($verbose) {
            print_r("Drop existing schema if exists.\n");
        }
        $tool->dropSchema($classes);
        if ($verbose) {
            print_r("Rebuild the schema.\nRunning:\n");
            foreach ($tool->getCreateSchemaSql($classes) as $statement) {
                print_r($statement . "\n");
            }
        }
        $tool->createSchema($classes);

        $config = $this->getServiceLocator()->get('Config');
        $setUp = $config['jaztec_acl']['setUp'];

        $roleSetUp = $setUp['roles'];
        /* @var \JaztecAcl\Entity\Acl\Role[] $roles */
        $roles = [];

        // Setup roles.
        foreach ($roleSetUp as $setUpConfig) {
            $role = new Role($setUpConfig['name'], null, $setUpConfig['sort']);

            $this->validateRoleParent($setUpConfig, $roles, $role);

            $em->persist($role);
            $roles[] = $role;
        }
        $em->flush();

        // Add a global user.
        if ($verbose) {
            print_r("Create an administrative user with email '{$email}'.\n");
        }
        $this->addAdminUser($email);

        return "Database installed\n";
    }