Lesson 2 of 6 · Database CI/CD

Continuous Delivery vs Deployment

Why most database teams choose continuous delivery, what continuous deployment requires, and a risk-based middle ground.

Beginner 6 sections 3 min read

Delivery or deployment?

Most teams that run databases choose continuous delivery: everything is automated and always ready to release, but a person approves each production release. It keeps most of the speed of continuous deployment while giving a human the final say over changes that touch valuable, hard-to-undo data.

The difference between the two is a single step, the approval before production, but that step matters a great deal for databases.

Why teams choose continuous delivery

Some database changes can't be undone
Application code can be rolled back in seconds. A dropped column, a data fix, or a destructive migration can't be, so many teams want a person to confirm the production release, with the preview of exactly what will run in front of them.
Regulations and audits
Banks, healthcare companies, and public companies often must show that every production change was approved by someone other than its author, under rules such as SOX in the United States. An approval step in the pipeline records exactly that, automatically.
Change management processes
Many organizations have change advisory boards or ServiceNow change records, as covered in IT Service Management and ServiceNow. Continuous delivery fits them: the pipeline waits for the approved change, then releases it the same way every time.
Timing matters
A large table change might need a quiet period, a coordinated application release, or to avoid month-end processing. With delivery, the team chooses when; with deployment, it happens as soon as the change is merged.
Production-sized effects
Tests can't always reveal how long a change will take on a 5 TB table, or what it will lock. A DBA reviewing the plan can spot a risky change that passed every test.
Building trust
Teams new to automation usually start with delivery, and move individual kinds of change to full deployment as their tests and monitoring prove themselves.

When continuous deployment works

Continuous deployment of database changes is possible, and some teams do it, but it needs everything below in place:

  • Backward-compatible changes only, using the expand and contract pattern from Database Change Management, so no single release can break the running application.
  • Thorough automated tests on realistic, production-sized data.
  • Small, frequent changes, each easy to understand.
  • Strong monitoring and alerts, tied to SLOs, that catch a slowdown within minutes.
  • Feature flags, which switch new features on and off without a release, so a problem can be disabled instantly.
  • Automated guardrails that block risky changes, such as dropping objects or rebuilding large tables, and send them for manual approval instead.

A common middle ground

Many teams don't choose one approach for everything. They decide by risk:

Change passes all tests Low risk: additiveHigh risk: destructive or large new table, nullable column, onlineindex, view, new proceduredrop, rename, type change, data fix,big tables Deploy automatically DBA approves,then deploy

Tools can help classify changes automatically, for example by checking migrations for keywords such as DROP or TRUNCATE, or with policy checks offered by migration tools, and routing them to a manual approval step.

Side by side

Continuous deliveryContinuous deployment
Production releaseAfter a person approvesAutomatic
Typical for databases inMost enterprises, regulated industriesFast-moving product companies with mature testing
SpeedFast: hours or daysFastest: minutes
Control over timingFullLittle: changes go out when merged
Audit trailApprovals recordedTests and reviews recorded
PrerequisitesAutomated tests and deploymentsPlus backward-compatible changes, feature flags, strong monitoring

Key takeaways

  • Most database teams choose continuous delivery: fully automated, always ready, with a person approving production.
  • Reasons include irreversible changes, regulations and audits, change management, timing, and production-sized effects tests can't predict.
  • Continuous deployment of database changes needs backward-compatible changes, strong tests, monitoring, feature flags, and guardrails.
  • A common middle ground deploys low-risk, additive changes automatically and sends risky ones for approval.
  • Either way, the release itself is automated.