implement Database.get_version() and Database.needs_upgrade()