Skip to content

Add apply-prod-migrations job to CI/CD pipeline#137

Merged
dariemcarlosdev merged 3 commits into
masterfrom
dev
Oct 21, 2025
Merged

Add apply-prod-migrations job to CI/CD pipeline#137
dariemcarlosdev merged 3 commits into
masterfrom
dev

Conversation

@dariemcarlosdev

@dariemcarlosdev dariemcarlosdev commented Oct 21, 2025

Copy link
Copy Markdown
Owner

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.

Summary by CodeRabbit

  • Chores
    • Deployment pipeline updated to run production database migrations as a dedicated pre-deploy step and gate API deployment on its success.
    • Improved deployment reliability and consistency by ensuring DB schema updates are applied before the API is released, reducing release-time failures.
    • Note: this change is comment-only and introduces no functional or behavioral differences.

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.
Copilot AI review requested due to automatic review settings October 21, 2025 00:38
@dariemcarlosdev dariemcarlosdev self-assigned this Oct 21, 2025
@coderabbitai

coderabbitai Bot commented Oct 21, 2025

Copy link
Copy Markdown

Note

Other AI code review bot(s) detected

CodeRabbit 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.

Walkthrough

A single comment line was added to the apply-prod-migrations job in .github/workflows/ci-cd.yml clarifying it runs only on master or Staging branches. No functional or behavioral changes were made.

Changes

Cohort / File(s) Summary
CI workflow comment edit
\.github/workflows/ci-cd.yml
Added a comment inside the apply-prod-migrations job noting it only runs on master or Staging branches; no changes to job logic, gates, or other workflow behavior.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇 I nudged a comment, small and bright,

“Runs on master or Staging” — tucked in tight,
The pipeline hums unchanged tonight,
A quiet hop, everything still right.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Free

📥 Commits

Reviewing files that changed from the base of the PR and between b50bc1d and 1d58050.

📒 Files selected for processing (1)
  • .github/workflows/ci-cd.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/ci-cd.yml

Note

🎁 Summarized by CodeRabbit Free

Your 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 @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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-migrations job to handle database migrations independently
  • Modified deploy-azure-api job 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.

Comment thread .github/workflows/ci-cd.yml
Comment thread .github/workflows/ci-cd.yml
dariemcarlosdev and others added 2 commits October 20, 2025 20:39
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@dariemcarlosdev dariemcarlosdev merged commit 80160b7 into master Oct 21, 2025
9 checks passed
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.

2 participants