def migrate_doc(self, doc):
		"""
		Migrate the doc from its current version to the target version
		and return it.
		"""
		orig_ver = doc.get(self.version_attribute_name, 0)
		funcs = self._get_migrate_funcs(orig_ver, self.target_version)
		for func in funcs:
			func(self, doc)
			doc[self.version_attribute_name] = func.target
		return doc