protected function tableExists($tableName)
    {
        $rs = $this->getEntityManager()->getConnection()->fetchAll('SHOW TABLE STATUS');

        foreach ($rs as $row) {
            if ($tableName === $row['Name']) {
                return true;
            }
        }

        return false;
    }