'Allows to destroy database.
**not reversable** operation!'

def destroy(self):

    if (not self.exists()):
        raise DatabaseConflict("Doesn't    exists'")
    for index in reversed(self.indexes[1:]):
        try:
            self.destroy_index(index)
        except:
            pass
    if (getattr(self, 'id_ind', None) is not None):
        self.id_ind.destroy()
    for (root, dirs, files) in os.walk(self.path, topdown=False):
        for name in files:
            os.remove(os.path.join(root, name))
        for name in dirs:
            os.rmdir(os.path.join(root, name))
    os.rmdir(self.path)
    self.close()
    return True
