Skip to content

4.4 — Automate EF Core migrations in deployment #59

@davidortinau

Description

@davidortinau

Description

Automate EF Core migrations in the deployment pipeline. Ensures database schema is always in sync with code without manual steps or data loss.

Dependencies

Acceptance Criteria

  • Migration scripts generated: dotnet ef migrations script --idempotent
  • Migrations run before app starts (init container or migration bundle)
  • Tested: schema updates work end-to-end without data loss
  • Rollback tested (previous migration script works)
  • All migrations are additive (no data deletion)
  • Staging and production both have clean migration history

Technical Notes

  • Option A: Migration bundle (embedded in app)
  • Option B: Init container that runs migrations before app
  • Use --idempotent to make migrations safe to rerun
  • Verify migrations work on both staging and production

Phase: 4 | Size: M | Owner: Zoe (Lead)

Metadata

Metadata

Assignees

No one assigned

    Labels

    phase:4-pipelinePhase 4: Deployment Pipelinesize:MMedium task (3-5 days)squadSquad triage inbox — Lead will assign to a membersquad:zoeAssigned to Zoe (Tester)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions