Skip to content

[docs] Document AddEFMigrations and PublishAsMigrationBundle with publishContainer option#774

Merged
IEvangelist merged 2 commits intorelease/13.3from
docs/ef-migrations-bundle-container-6b75669525f4acda
Apr 30, 2026
Merged

[docs] Document AddEFMigrations and PublishAsMigrationBundle with publishContainer option#774
IEvangelist merged 2 commits intorelease/13.3from
docs/ef-migrations-bundle-container-6b75669525f4acda

Conversation

@aspire-repo-bot
Copy link
Copy Markdown
Contributor

Documents changes from microsoft/aspire#16289

@AndriySvyryd

Targeting mainrelease/13.3 does not exist on microsoft/aspire.dev (only main is present), so falling back to main as the effective target branch.

Why this PR is needed

PR microsoft/aspire#16289 added the ability to publish an EF Core migration bundle as a container image by passing publishContainer: true to PublishAsMigrationBundle(). The existing EF Core migrations documentation on aspire.dev only covers the manual worker-service approach and contains no coverage of the AddEFMigrations AppHost API, RunDatabaseUpdateOnStart, PublishAsMigrationScript, or PublishAsMigrationBundle. This PR fills that gap.

What was changed

Added a new top-level section "Automated EF migrations with AddEFMigrations" to src/frontend/src/content/docs/integrations/databases/efcore/migrations.mdx covering:

  • Package installation (Aspire.Hosting.EntityFrameworkCore)
  • AppHost configuration via AddEFMigrations
  • RunDatabaseUpdateOnStart() for local run mode, with resource state table
  • PublishAsMigrationScript() and PublishAsMigrationBundle() for the publish pipeline
  • New in 13.3: publishContainer: true — wraps the bundle in a container image that any compute environment can deploy like a regular container
  • Per-environment restart-prevention patterns (Azure Container App Job, Docker Compose, Kubernetes tabs)
  • Artifact-only usage (no container image) for CI/CD pipeline scenarios

Files modified

  • src/frontend/src/content/docs/integrations/databases/efcore/migrations.mdx — updated (146 lines added)

This draft PR needs human review before merging.

Generated by PR Documentation Check for issue #16289 · ● 2.3M ·

…ishContainer

Document the AddEFMigrations AppHost API and the new publishContainer: true
option for PublishAsMigrationBundle introduced in microsoft/aspire#16289.

- Add 'Automated EF migrations with AddEFMigrations' section covering:
  - Package installation
  - AppHost configuration via AddEFMigrations
  - RunDatabaseUpdateOnStart for local run mode
  - PublishAsMigrationScript and PublishAsMigrationBundle for publish pipeline
  - New publishContainer: true option to wrap bundle in a container image
  - Per-environment configuration (ACA Job, Docker Compose, Kubernetes)
  - Artifact-only (no container) usage pattern

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@aspire-repo-bot aspire-repo-bot Bot added the docs-from-code Copilot initiated issue from dotnet/aspire repo label Apr 29, 2026
@aspire-repo-bot aspire-repo-bot Bot requested a review from AndriySvyryd April 29, 2026 04:39
@IEvangelist IEvangelist marked this pull request as ready for review April 29, 2026 20:50
@IEvangelist IEvangelist self-requested a review as a code owner April 29, 2026 20:50
Copilot AI review requested due to automatic review settings April 29, 2026 20:50
@IEvangelist IEvangelist requested a review from eerhardt as a code owner April 29, 2026 20:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds documentation for Aspire’s first-class EF Core migrations AppHost API (AddEFMigrations), including local startup migration execution and publish-time generation of migration scripts/bundles (including bundling as a container image via publishContainer: true).

Changes:

  • Expanded the page description to cover startup migrations and containerized migration bundles.
  • Added a new “Automated EF migrations with AddEFMigrations” section covering setup, local run behavior, publish artifacts, and per-environment deployment patterns.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/frontend/src/content/docs/integrations/databases/efcore/migrations.mdx Outdated
Comment thread src/frontend/src/content/docs/integrations/databases/efcore/migrations.mdx Outdated
Comment thread src/frontend/src/content/docs/integrations/databases/efcore/migrations.mdx Outdated
@AndriySvyryd AndriySvyryd changed the base branch from main to release/13.3 April 29, 2026 21:11
Comment thread src/frontend/src/content/docs/integrations/databases/efcore/migrations.mdx Outdated
Comment thread src/frontend/src/content/docs/integrations/databases/efcore/migrations.mdx Outdated
Comment thread src/frontend/src/content/docs/integrations/databases/efcore/migrations.mdx Outdated
Comment thread src/frontend/src/content/docs/integrations/databases/efcore/migrations.mdx Outdated
Comment thread src/frontend/src/content/docs/integrations/databases/efcore/migrations.mdx Outdated
Comment thread src/frontend/src/content/docs/integrations/databases/efcore/migrations.mdx Outdated
Agent-Logs-Url: https://github.com/microsoft/aspire.dev/sessions/e98f02d1-22c1-45c0-bac2-d26789008422

Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
@IEvangelist IEvangelist merged commit bdf16d1 into release/13.3 Apr 30, 2026
1 check passed
@IEvangelist IEvangelist deleted the docs/ef-migrations-bundle-container-6b75669525f4acda branch April 30, 2026 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-from-code Copilot initiated issue from dotnet/aspire repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants