Built in migration function.