Skip to content

microsoft/power-platform-skills / plugins/power-pages/skills/migrate-datamodel

migrate-datamodel

Verified

This skill should be used when the user asks to "migrate to enhanced data model", "migrate from standard to enhanced", "switch to EDM", "migrate SDM to EDM", "upgrade data model", "migrate site data model", or wants to migrate an existing Power Pages site from the Standard Data Model (SDM) to the Enhanced Data Model (EDM) using PAC CLI.

scripts/lib/edm-table-classification.js

View on GitHub
'use strict';

// Microsoft EDM categories are intentionally kept separate from the local
// snapshot scanner names. Nonconfiguration data is not part of the SDM -> EDM
// metadata comparison, while virtual configuration such as poll placements is.
const NONCONFIGURATION_TABLES = [
  { category: 'ads', label: 'Ads', table: 'Ad' },
  { category: 'polls', label: 'Polls', table: 'Poll' },
  { category: 'pollSubmissions', label: 'Poll submissions', table: 'Poll Submission' },
  { category: 'externalIdentities', label: 'External identities', table: 'External Identity' },
  { category: 'portalComments', label: 'Portal comments', table: 'Portal comment' },
  { category: 'invitations', label: 'Invitations', table: 'Invitation' },
  { category: 'invitationRedemptions', label: 'Invitation redemptions', table: 'Invitation Redemption' },
  // "Setting" is not adx_sitesetting: siteSettings contains migrated metadata
  // and must retain count/value validation.
  // https://learn.microsoft.com/en-us/power-pages/admin/migrate-enhanced-data-model
  { category: 'settings', label: 'Settings', table: 'Setting' },
  { category: 'webFormSessions', label: 'Web form sessions', table: 'WebFormSession' },
];

const NONCONFIGURATION_CATEGORIES = new Set(NONCONFIGURATION_TABLES.map(({ category }) => category));

const SDM_ONLY_CATEGORIES = new Set([
  'tags',
  'websiteBindings',
]);

// These categories are retained in raw snapshots but are not shown in the
// metadata component comparison. websiteBindings is an expected SDM-only
// download difference; forums/blogs/ideas are reserved for future scanners.
const REPORT_EXCLUDED_CATEGORIES = new Set([
  ...NONCONFIGURATION_CATEGORIES,
  'forums',
  'blogs',
  'ideas',
  'websiteBindings',
]);

const CATEGORY_METADATA = {
  ads: {
    label: 'Ads',
    reason: 'Ads are nonconfiguration data and are removed from the enhanced data model.',
  },
  polls: {
    label: 'Polls',
    reason: 'Polls are nonconfiguration data and are removed from the enhanced data model.',
  },
  pollSubmissions: {
    label: 'Poll submissions',
    reason: 'Poll submissions are nonconfiguration runtime data and are not part of the metadata migration.',
  },
  externalIdentities: {
    label: 'External identities',
    reason: 'External identities are nonconfiguration runtime data and are not part of the metadata migration.',
  },
  portalComments: {
    label: 'Portal comments',
    reason: 'Portal comments are nonconfiguration runtime data and are not part of the metadata migration.',
  },
  invitations: {
    label: 'Invitations',
    reason: 'Invitations are nonconfiguration runtime data and are not part of the metadata migration.',
  },
  invitationRedemptions: {
    label: 'Invitation redemptions',
    reason: 'Invitation redemptions are nonconfiguration runtime data and are not part of the metadata migration.',
  },
  settings: {
    label: 'Settings',
    reason: 'Settings are listed as nonconfiguration data in the enhanced data model.',
  },
  webFormSessions: {
    label: 'Web form sessions',
    reason: 'Web form sessions are nonconfiguration runtime data and are not part of the metadata migration.',
  },
};

function isNonconfigurationCategory(category) {
  return NONCONFIGURATION_CATEGORIES.has(category);
}

function isSdmOnlyCategory(category) {
  return SDM_ONLY_CATEGORIES.has(category);
}

function isReportExcludedCategory(category) {
  return REPORT_EXCLUDED_CATEGORIES.has(category);
}

function getCategoryMetadata(category) {
  return CATEGORY_METADATA[category] || {
    label: category,
    reason: 'This category is outside the SDM to EDM metadata comparison scope.',
  };
}

module.exports = {
  NONCONFIGURATION_TABLES,
  NONCONFIGURATION_CATEGORIES,
  SDM_ONLY_CATEGORIES,
  REPORT_EXCLUDED_CATEGORIES,
  isNonconfigurationCategory,
  isSdmOnlyCategory,
  isReportExcludedCategory,
  getCategoryMetadata,
};
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall