BrainyBeeBrainyBee
ExploreBlogStart Studying
HomeDesigning and Implementing Microsoft DevOps Solutions (AZ-400)Deployments including database tasks
Lesson255 words

Deployments including database tasks

Implement a deployment that includes database tasks

Databases are the part of a deployment that does not roll back cleanly. Application code can be swapped; data cannot be un-migrated without loss.

Backward compatibility is the whole strategy

Because application and schema deploy at different moments, the schema must be compatible with both the old and the new application version for the duration of the rollout. That is what makes a rollback survivable.

The standard sequence for a breaking change — renaming a column — is expand / migrate / contract:

Loading Diagram...
Figure 1 — Mermaid diagram
  1. Expand — add the new column. Old code ignores it; new code can use it.
  2. Migrate — deploy code that writes both, backfill existing rows.
  3. Contract — only once no running version reads the old column, drop it.

Each step is independently deployable and independently reversible. A single rename is neither.

Ordering and gating

The migration stage runs before the application stage that depends on it, and — as with any dependency — completion is not readiness. Migrations should be:

  • Idempotent, so a retried stage does not double-apply.
  • Transactional where the engine allows, so a failure leaves no partial schema.
  • Backed up first, because on: failure cannot undo a destructive DDL.

The most dangerous deployment is the one whose rollback plan is "restore from backup" without anyone having tested the restore.

Primary sources

  • https://learn.microsoft.com/en-us/azure/devops/pipelines/process/deployment-jobs
  • https://learn.microsoft.com/en-us/azure/devops/pipelines/process/stages
All Designing and Implementing Microsoft DevOps Solutions (AZ-400) Study Resources

Related Notes

  • Agent and runner infrastructure421 words
  • Agent and runner infrastructure — quick notes150 words
  • Alerting on pipeline events255 words
  • Alerting on pipeline events — quick notes94 words
  • Analyzing usage and application performance241 words
  • Analyzing usage and application performance — quick notes73 words
  • Appropriate access levels217 words
  • Appropriate access levels — quick notes85 words
  • Automating container scanning277 words
  • Automating container scanning — quick notes96 words
  • Automating documentation from Git history191 words
  • Automating documentation from Git history — quick notes55 words

Ready to study Designing and Implementing Microsoft DevOps Solutions (AZ-400)?

Practice tests, flashcards, and all study notes — free, no sign-up.

Start Studying

Ready to study Designing and Implementing Microsoft DevOps Solutions (AZ-400)?

Practice tests, flashcards, and all study notes — free, no sign-up needed.

Start Studying — Free
Designing and Implementing Microsoft DevOps Solutions (AZ-400) ResourcesExplore All HivesBlogHome

© 2026 BrainyBee. Free AI-powered exam prep.

Loading Diagram...
Flowchart, left to right. 1 Expand<br/>add new column connects to 2 Migrate<br/>dual-write, backfill. M connects to 3 Contract<br/>drop old column.