adjust migrate  (fixes #4096)