Skip to content

Bundle EF migrations for deployment - #1455

Open
BenjaminMichaelis wants to merge 1 commit into
mainfrom
benjaminmichaelis-bundle-ef-migrations
Open

BenjaminMichaelis wants to merge 1 commit into
mainfrom
benjaminmichaelis-bundle-ef-migrations

Conversation

@BenjaminMichaelis

Copy link
Copy Markdown
Member

Database migrations currently run during web-app startup, so every replica can participate in schema updates as the app deploys. This change packages migrations with the release image and moves execution into a single manual Azure Container Apps Job before the web app is updated.

  • Build a Linux x64 EF migration bundle into the image and remove migration execution from application startup.
  • Before Dev and Prod app updates, update the migration job to the exact image being deployed, start an execution, and wait for that execution to succeed. A failed or timed-out migration stops the rollout.
  • Document local migration commands, the required MIGRATION_JOB_NAME GitHub Environment variables, and the possibility of downtime for breaking or long-running migrations.

Infrastructure dependency: the matching job resource, environment outputs, and job-scoped deployment permissions are in the separate Azure Resource Management worktree/session. Merge those Terraform changes and set the Development and Production MIGRATION_JOB_NAME variables to dev_web_migration_job_name and prod_web_migration_job_name before relying on these workflow steps.

Validation: Release solution build and all 176 tests passed; the Linux bundle generated successfully; no pending EF model changes; workflow YAML, shell syntax, and diff checks passed. Docker image build and Terraform validation/tests were unavailable because Docker and Terraform are not installed in this environment.

Fixes: #1133

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot mentioned this pull request Oct 4, 2026

This branch has not been deployed

No deployments
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.

Bundle ef migrations

1 participant