The previous article is here: https://msolenacrm.blog/2024/08/06/power-pages-migrate-standard-data-model-sites-to-enhanced-data-model-part-1/
Let’s complete the upgrade!
We are up to Step 4 now: https://learn.microsoft.com/en-us/power-pages/admin/migrate-enhanced-data-model#step-4-update-site-data-model-version-after-successful-data-migration
Use the following command update site data model version:
pac powerpages migrate-datamodel --webSiteId [WebSiteId-GUID] --updateDatamodelVersion --portalId [Portal-GUID]
You are lucky if it works. It didn’t work for us, unfortunately.
We received an error and from the log file, it was clear that it was looking for the website on the wrong environment. It was looking at the Default environment. Despite displaying us a message “Connecting to the environment A…”
OK.
pac auth list
Index Active Kind Name User Cloud Type Environment Environment Url
[1] UNIVERSAL <User Name> <Environemnet> <URL1>
[2] * UNIVERSAL <User Name> <Correct Environment> <URL2>
Now we used the following command to select the correct environment, which is the index 2 item.
pac auth select --index 2
New default profile:
* UNIVERSAL : <User Name> Public <Correct environment URL>
And then we run the command:
pac powerpages migrate-datamodel --webSiteId [WebSiteId-GUID] --updateDatamodelVersion --portalId [Portal-GUID]
This time it worked as expected.
Current migration status is : CompletedSite is updated to enhanced data model successfully.Site is ready to browse now.
Original Post https://msolenacrm.blog/2024/08/07/power-pages-migrate-standard-data-model-sites-to-enhanced-data-model-part-2/