John Mueller of Google was asked about doing site migrations and if it can impact your SEO. The short answer is that it can impact your SEO but if you do everything correctly it can be a matter of days until everything is back to where it was prior to the migration. But that is a big “if” – if you do it correctly