protected function rebuildDatabase()
    {
        # 2. Drop the existing database schema
        $this->schemaTool->dropDatabase();

        # 3. Create the new database schema based on (1)
        $entityMeta = $this->em->getMetadataFactory()->getAllMetadata();
        $this->schemaTool->updateSchema($entityMeta);
    }