Hi,
Should I upgrade the SHA1 before or it will be done during the PKI migration ?
No, the operating system upgrade doesn't upgrade upgrade automatically the SHA1 to SHA256.
When you migrate your PKI , you will use the old certificate with SHA1 if you don't renew it with SHA256 beforehe backup.
Please don't forget to mark this reply as answer if it help you to fix your issue