Database Migration Deployment Checklist: Backups, Zero-Downtime Changes, and Rollback Plans
databasesschema migrationsdeploymentreliabilityrelease engineering

Database Migration Deployment Checklist: Backups, Zero-Downtime Changes, and Rollback Plans

DDevOps Collective Editorial Team
2026-11-19
8 min read

A practical database migration checklist for backups, zero-downtime schema changes, monitoring, and safe rollback or roll-forward decisions.

Safe database schema changes depend on more than a migration file that passes in staging. This database migration deployment checklist gives engineering teams a repeatable way to assess compatibility, verify backups, separate expand and contract changes, control locking risk, monitor production impact, and choose between rollback and roll-forward actions.

Overview

A production database migration is a coordinated release across data, application code, infrastructure, and operations. The central question is not simply whether the new schema is valid. It is whether every application version that may run during deployment can continue to read and write safely while the change is applied.

The safest default is an expand-and-contract workflow:

  1. Expand: add the new structure in a backward-compatible way, such as a nullable column, new table, or additional index.
  2. Migrate: deploy application code that can use both the old and new structure, then backfill or dual-write as needed.
  3. Contract: remove the old column, constraint, table, or code path only after all readers and writers have moved.

This sequence reduces dependence on a single instantaneous cutover. It is especially useful in rolling deployments, where old and new application instances can coexist. The exact commands and locking behavior vary by database engine, version, migration framework, table size, and workload, so validate the plan against the documentation for your environment rather than assuming that a migration is online because it completed quickly in development.

For release context, pair this checklist with an SLO and error budget review. A migration that is technically reversible may still be inappropriate during a period of degraded reliability or limited operational capacity.

What to track

1. Compatibility and dependency scope

Before scheduling the change, record the current schema, application versions, migration order, feature flags, background workers, reporting jobs, and external consumers. Identify whether any service accesses the database directly or relies on a generated client, ORM model, view, stored procedure, or replica.

Use this compatibility guide as a starting point:

ChangeTypical riskSafer deployment pattern
Add nullable columnUsually low, but defaults or metadata locks may add workAdd first; deploy code later; make it required only after writers are updated
Add tableUsually low, with possible index or foreign-key costsCreate separately, validate access paths, then release application usage
Add indexBuild time, write overhead, and locking behavior vary by engineUse the engine's online or concurrent option where appropriate and observe progress
Rename columnHigh if old application versions still query the old nameAdd the replacement, deploy compatible code, backfill, then remove the old field
Change column typeConversion errors, truncation, and long locksAdd a new column, copy in batches, validate, switch reads and writes, then contract
Add non-null constraintExisting rows or concurrent writes may violate itBackfill and validate first; enforce only after the data is clean
Drop column or tableIrreversible data loss and hidden consumer failuresStop reads and writes, observe a deprecation window, back up, then remove

2. Backup and restore readiness

Document the latest usable backup, its retention period, storage location, encryption controls, and the recovery point it represents. A backup is not a rollback plan until the team has tested restoring it or has an accepted recovery procedure for the service.

  • Confirm that automated backups are succeeding and that transaction-log or point-in-time recovery data is available when used by your platform.
  • Estimate restoration time for the affected database and compare it with the service's recovery objectives.
  • Check that the backup includes the relevant database, schema, extensions, permissions, and configuration dependencies.
  • Decide whether the migration changes data in a way that makes logical reversal possible. A down migration cannot recover values that were truncated, merged, or deleted.

3. Migration behavior and operational limits

Track estimated row counts, index size, expected duration, batch size, transaction length, lock timeout, statement timeout, replication lag, and disk headroom. Test with production-like data volume and concurrency, not only a small local fixture.

Ask specifically:

  • Does the operation take a table, row, metadata, or schema lock?
  • Can reads or writes continue while the operation runs?
  • What happens if the migration is interrupted halfway through?
  • Can it be safely retried, or does it require cleanup first?
  • Will replicas, change-data-capture jobs, search indexes, or caches fall behind?

Online schema-change tools can reduce blocking for some operations, but they may create triggers, shadow tables, extra disk usage, or a final cutover lock. Treat those tools as a different operational procedure, not as a universal guarantee of zero downtime.

4. Release and observability signals

Define the dashboards and alerts before deployment. At minimum, watch migration progress, lock waits, query latency, error rate, connection saturation, CPU, memory, storage, replication lag, deadlocks, and application-level failures involving the changed fields or tables.

Record a baseline for the same time window before the change. Without a baseline, a team may mistake normal traffic variation for migration impact or miss a gradual regression.

Cadence and checkpoints

Use the following checkpoints for each production schema change. The owner should mark each item complete in the pull request, change record, or deployment system.

Pre-deployment checklist

  • Define the user or service outcome and identify the tables, indexes, constraints, and code paths involved.
  • Classify the change as additive, modifying, destructive, or data-moving.
  • Confirm backward compatibility with all application versions that may run during rollout.
  • Test the migration against a representative dataset and realistic concurrency.
  • Review execution plans, lock behavior, timeouts, retry behavior, and interruption handling.
  • Verify backup success, recovery access, and the planned recovery point.
  • Choose a deployment window with an accountable operator, reviewer, and incident channel.
  • Prepare feature flags, traffic controls, pause conditions, and the exact commands for forward and recovery actions.

Deployment checkpoints

  1. Capture baseline metrics and the current migration version.
  2. Apply the expand step and confirm that it completed as expected.
  3. Release compatible application code separately where possible.
  4. Backfill in bounded batches with a pause mechanism and a progress marker.
  5. Validate row counts, null rates, checksums, application reads, and writes.
  6. Increase traffic gradually if the release architecture supports it.
  7. Keep the old schema path available until monitoring shows that it is no longer needed.

After deployment

Continue observing beyond the moment the migration command exits. Delayed effects can include replica lag, cache churn, slower background jobs, increased storage, or query-plan changes. Record the final migration duration, peak resource use, errors, manual interventions, and any difference between the estimate and reality.

For database changes bundled with container releases, keep the image and migration versions traceable. The Docker image tagging strategy guide provides related guidance for making release artifacts easier to identify during rollback analysis.

How to interpret changes

Not every metric change requires an abort, but every unexpected change should have an owner and a decision threshold. Use a simple risk matrix:

Risk levelIndicatorsResponse
LowNo error increase, normal latency, stable locks and replicationContinue while recording progress and checking completion criteria
ModerateSmall sustained latency increase, growing queue, or slower replicaPause batches, reduce concurrency, investigate, and reassess before continuing
HighLock contention, failed writes, timeouts, rapid disk growth, or material replication lagStop the migration, protect user traffic, and choose roll-forward or recovery with the incident lead
CriticalData integrity concern, widespread errors, unavailable primary, or unrecoverable destructive stepDeclare an incident, stop related releases, preserve evidence, and execute the tested recovery plan

Rollback or roll-forward?

Rollback is appropriate when the schema and data can be restored without ambiguity and the reverse operation will not create more risk. For additive changes, rolling back application code while leaving an unused column or table may be safer than immediately removing it.

Roll-forward is often preferable after a destructive or partially completed data transformation. It may involve fixing the migration, completing a safe backfill, disabling a feature, or deploying code that tolerates the intermediate state. Do not run a down migration automatically simply because the application release was rolled back.

Incident decision template

When a migration causes an unexpected effect, capture these facts in the incident channel:

  • Observed: metric, error, affected query, and first known time.
  • Scope: services, tenants, regions, tables, replicas, or data ranges affected.
  • Current action: paused, throttled, disabled, rolled back, or continuing.
  • Safety check: whether writes are consistent and whether data loss is possible.
  • Decision: rollback, roll-forward, restore, or monitor, with the decision owner.
  • Next checkpoint: the metric or condition that will trigger the next action.

When to revisit

Review this checklist before every production migration, framework upgrade, database-engine upgrade, and rollback exercise. A quarterly review is a useful minimum for teams with frequent releases; teams with infrequent changes should still review it before each change rather than relying on memory.

Refresh the runbook when database versions, migration tools, hosting platforms, backup methods, online schema-change capabilities, or deployment workflows change. Recheck engine-specific locking and index-build behavior after major upgrades. Also revisit the document after an incident, a failed restore test, a near miss, or a migration that took substantially longer than expected.

To make the process practical, assign one owner to maintain the checklist and one reviewer to challenge the assumptions. Keep a small migration history with planned duration, actual duration, peak resource use, recovery method, and follow-up actions. Review those recurring data points monthly or quarterly. Trends such as increasing backfill time, shrinking disk headroom, or repeated lock contention are signals to redesign the migration process before the next release.

Before approving your next schema change, copy the checklist into the change record, fill in the thresholds, test the recovery path, and schedule the post-deployment review. The goal is not to eliminate every operational risk; it is to make the risk visible, bounded, and actionable while the team still has options.

Related Topics

#databases#schema migrations#deployment#reliability#release engineering
D

DevOps Collective Editorial Team

DevOps Editors

Senior editor and content strategist. Writing about technology, design, and the future of digital media. Follow along for deep dives into the industry's moving parts.