Release compatibility
What you need to know
Release compatibility ensures old and new application versions can coexist during deployment. A rollback is possible only when the old artifact can still operate against the current data and surrounding services.
By the end, you can: coordinate schema and code rollout; define rollback boundaries.
Plan a fictional book-title migration
R1: reads and writes titleExpand: add nullable display_titleR2: writes both; reads display_title ?? titleBackfill: update missing display_title in bounded batchesR3: use display_title, keep old title until rollback window endsContract: remove title only after dependency auditExpected behavior: A possible sequence under the stated assumptions. Real mixed-version writes need a verified synchronization strategy and transactional constraints.
How it works
Use an expand-and-contract migration when changing a shared schema. First introduce a backward-compatible field or table; deploy application code that tolerates both forms, migrate existing data with bounded and resumable work, and switch reads only after verifying invariants. Remove the old field only after all old readers and writers are gone and the rollback window has closed. During rollout old browsers may still request old chunks or invoke older Server Actions; retain compatible assets or use a verified skew-protection mechanism. Assign one immutable release identity and record schema compatibility, dependency constraints, cache generation and secret-rotation plan. The documented deploymentId is shared by replicas of the same deployment and helps detect client/server version skew. It does not synchronize database schemas, guarantee compatibility of old writes or replace an asset retention and rollback policy. Test both versions against the transitional schema, including writes, missing values, duplicate requests and authorization. Stop promotion on failed gates. Restore data only through a separately rehearsed recovery plan; a code rollback is not a database restore.
Check an explicit rollback compatibility contract
{ "currentSchema": 3, "previousRelease": { "minSchema": 1, "maxSchema": 2 }, "rollback": "blocked"}Expected behavior: Schema version 3 exceeds the previous release’s supported range. Do not blindly start the old app.
Common mistake
Do not drop a column in the same rollout that still has old readers, or assume restoring an older image restores the database. Keep destructive changes separate and reviewed.
Practice and verification
Use the release compatibility exercise, then write a migration plan for a required catalog field. State how old writers remain safe, how backfill can resume, and how to prove a previous artifact can still read and write.
Scope: Proposed Next.js 16.x / React 19, App Router with Cache Components disabled unless noted. Framework and browser examples are staged, not executed. Hypothetical costs are not actual provider rates.
Further reading: Self · Deploymentid · Kube · Ci