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

        // Rebuild the schema
        if ($verbose) {
            print_r("Update existing schema.\nRunning:\n");
            foreach ($tool->getUpdateSchemaSql($classes) as $statement) {
                print_r($statement . "\n");
            }
        }
        $tool->updateSchema($classes, true);

        return "Database updated\n";
    }