adds migrate support, fixes #5