trivial: adjust migration code to remove duplication
trivial: adjust migration code to remove duplication

fwupd/fwupd,hughsie/fwupd,fwupd/fwupd,fwupd/fwupd,hughsie/fwupd,hughsie/fwupd,fwupd/fwupd,hughsie/fwupd