Add apply-prod-migrations job to CI/CD pipeline#137
Conversation
Introduce a new job `apply-prod-migrations` in `ci-cd.yml` to apply EF Core migrations to the production database before deployment. This job runs on `master` or `Staging` branches and includes steps for code checkout, .NET setup, EF Core CLI installation, and migration application to Azure PostgreSQL. Update `deploy-azure-api` job to depend on the new migrations job, and comment out unnecessary setup steps.
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughA single comment line was added to the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Free 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a dedicated apply-prod-migrations job to run EF Core database migrations separately before deployment, ensuring migrations are applied reliably before the API deployment proceeds. This refactoring extracts migration logic from the deployment job into a standalone job that serves as a prerequisite.
Key Changes:
- Added new
apply-prod-migrationsjob to handle database migrations independently - Modified
deploy-azure-apijob dependency chain to require migrations completion - Commented out duplicate migration steps previously embedded in the deployment job
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Introduce a new job
apply-prod-migrationsinci-cd.ymlto apply EF Core migrations to the production database before deployment. This job runs onmasterorStagingbranches and includes steps for code checkout, .NET setup, EF Core CLI installation, and migration application to Azure PostgreSQL. Updatedeploy-azure-apijob to depend on the new migrations job, and comment out unnecessary setup steps.Summary by CodeRabbit