Migrate standard data model sites to enhanced data model (preview)
Article
[This topic is prerelease documentation and is subject to change.]
In this article, learn how to migrate your existing standard data model site to enhanced data model.
Important
This feature is a preview feature.
Preview features aren’t meant for production use and may have restricted functionality. These features are available before an official release so that customers can get early access and provide feedback.
Step 1. Download and check customization for existing standard site metadata
Open a command prompt.
Use the following command to authenticate to the Dataverse organization for your Power Platform environment to download the website record for migration.
pac powerpages migrate-datamodel --webSiteId 076bf556-9ae6-ee11-a203-6045bdf0328e –-mode all
The migration tool verifies the solutions. If there’s a standard data model solution present without a respective enhanced data model solution for the mentioned template, a warning is displayed: Found template <template-name>. One of the prerequisite for migrate needs Enchanged data model template
There are specific templates, such as Program registration and Schedule and Manage meetings, which require matching enhanced data model packages to ensure the migrated website functions properly. To obtain these enhanced data model packages, you must create a new site for the corresponding template (the environment should be enabled for the enhanced data model) to provide enhanced data model compatible solutions for migration.
Supported templates for migration
Sites with following templates are supported for migration:
Starter layout 1-5
Application processing
Blank page
Program registration
Schedule and manage meetings
Step 3. Verify the migration status
Use the following command to verify your site's migration status:
If your site migration is taking longer than anticipated, it may be due to the volume of data. If your command prompt closes, open a new command prompt and use the command in this step to verify your site's status.
Step 4. Update site data model version after successful data migration
Use the following command update site data model version:
You can find the Portal id by navigating to the website with '/_services/about' appended to the URL of the website. In order to view these options, user should have a web role with all website access permissions assigned.
After the site data model version is updated, the website record linked to the standard data model will be deactivated. Instead, the site will now refer to the website record associated with the enhanced data model.
User should have any one of the following roles to execute migration command with updateDatamodelVersion or revertToStandardDataModel arguments. As this will perform admin action to switch your site to enahance data model or vice versa.
When you switch a migrated site from the enhanced data model back to the standard data model, the website record associated with the enhanced data model will be deactivated, and the website record for the standard data model will be reactivated.
Migrate a production site from standard to enhanced data model
Before migrating a production site, we recommend creating full copy of the production site. We also recommend production site migration to be conducted during nonbusiness hours.
Use these steps to migrate your production site to the enhanced data model:
Try out the migration on the site in the copied environment using the PAC CLI migrate-datamodel command.
Add site configuration data to managed solution and import it production environment.
Use PAC CLI commands to migrate nonconfiguration data and finish it by updating data model version for production.
Note
For migration the source and production website id are same.
Considerations for site customization when migrating sites from standard to enhanced data model
This section provides guidance fixing customization for a site migration from standard to enhanced data model.
There are five types of site customizations on adx metadata tables:
All customization related fixes will be done after migration to the enhanced data model.
Custom columns on adx metadata tables
To fix this customization in enhanced data model, create a relationship between system tables and new custom table and migrate the data to the new table.
Standard data model: The table adx_webpage contains a custom column as contoso_pagetype.
Enhanced data model: Create a new table named contoso_webpage. This will include a column called contoso_pagetype and a lookup column contoso_webpage_id that is associated with powerpagescomponent. Utilize the Data workspace for table creation.
Relationship between custom tables and adx tables
To fix this customization in enhanced data model, create a relationship between custom tables and system tables.
Standard data model: The table adx_webpage has a relationship named adx_webpage_contoso_pagelogs with the contoso_pagelogs table.
Enhanced data model: Create a new relationship named powerpagecomponent_contoso_pagelogs with the contoso_webpage table. Utilize the Data workspace for table creation.
Adx table references in liquid code snippet
To fix this customization in enhanced data model, replace the adx table references in liquid code with enhanced data model virtual tables mspp references. Alternatively, you can use the Site Component (logical name powerpagecomponent) table along with the Component Type (logical name powerpagecomponenttype) attribute to retrieve the corresponding references.
Standard data model:entities liquid tag is used to access weblinks values in {% assign app_weblinks= entities['adx_weblinks'] %} code.
Enhanced data model: Instead of using weblinks via entities liquid tag, use respective liquid objects. entities[adx_weblinks] directly. In this case entities['adx_weblinks'] can be replaced with weblinks liquid object.
Adx table references in fetch xml
To fix this customization in enhanced data model, replace the adx table references in fetch xml with enhanced data model virtual tables direct references. Alternatively, you can use the Site Component (logical name powerpagecomponent) table along with the Component Type (logical name powerpagecomponenttype) attribute to retrieve the corresponding references.
Standard data model: The table name adx_webrole is used within the fetch xml query.
Enhanced data model: Use Site Component (logical name powerpagecomponent) in conjunction with the Component Type (logical name powerpagecomponenttype) attribute to retrieve the corresponding references.
To fix this customization in enhanced data model, the workflow and plugin logic needs to refactored and re-registered on the site's respective table.
For instance, if a user registered the workflow/plugin to the Primary Entity as Web Page (logical name adx_webpage) table in the standard data model, then the code within the workflow/plugin must be modified to Site Component (logical name powerpagecomponent) table and its attributes for the enhanced data model.
Known issues
The migration command is only processing a batch of 5K records from the standard data model to the enhanced data model.