Skip to content

feat(migrations)!: pivot to declarative .m4d and CLI-first workflows - #4

Merged
rnwood merged 1 commit into
mainfrom
feat/declarative-m4d-cli-pivot
Nov 1, 2026
Merged

rnwood merged 1 commit into
mainfrom
feat/declarative-m4d-cli-pivot

Conversation

@rnwood

@rnwood rnwood commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • Replace self-invoking .ps1 migration jobs with executable .m4d definitions using a root $Migration object, Steps, Connections, RunOptions, and optional PreRun/PostRun hooks.
  • Make m4d run <file> the recommended entry point. Keep advanced PowerShell usage through Invoke-M4dMigration -Path, move the scheduler to Invoke-M4dMigrationGraph, and add New-M4dMigrationFile / m4d new-file for a commented starter template.
  • Ensure explicit cmdlet and CLI options override file defaults. The CLI starts the dashboard by default, prints its URL, and supports --no-dashboard for headless runs; low-level CLI commands are grouped under advanced.
  • Convert all examples and align documentation, package tests, and generated release notes with the new workflow. Recommend the self-contained CLI, which bundles its runtime and has no separate runtime prerequisites; retain the PowerShell module path for advanced use (PowerShell 7.6+ and .NET 10).
  • Fix Dataverse target row materialization so upstream writes do not interpret dictionary properties such as Count as entity columns.

Why

This is a major pivot toward a flexible, fast, easy-to-install engine optimized for Dataverse and the age of AI coding agents. Declarative .m4d files make migration jobs inspectable and easier to author, while the self-contained CLI removes setup friction for the default workflow.

Validation

  • dotnet build Migration4Dataverse.slnx --configuration Release --no-restore — passed with 0 warnings and 0 errors.
  • dotnet test Migration4Dataverse.slnx --configuration Release --no-build — 360 passed.
  • build/Test-MigrationModulePackage.ps1 -Version 0.1.0 with an isolated output directory — passed.
  • git diff --check — passed.

The sequential Dataverse example was resumed against an isolated SQLite database with the dashboard enabled. The live run had not yet completed when this PR was opened, so it is not counted as a completed end-to-end validation.

Replace imperative migration scripts with .m4d definitions and lifecycle hooks, and make the self-contained CLI the recommended entry point. Update examples, documentation, release notes, packaging, and dashboard startup to match the new workflow. Also normalize Dataverse target rows before upstream writes.

Co-authored-by: Copilot <[email protected]>
@rnwood
rnwood merged commit 84bbf03 into main Nov 1, 2026
3 checks passed
@rnwood
rnwood deleted the feat/declarative-m4d-cli-pivot branch November 1, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant