Build the safeguards
Eight explained steps, a source example and a checkpoint at each decision.
Read the tutorialDelivery / Database migrations / Infrastructure as code
Choose a pattern by the failure it addresses. Several safeguards can be necessary at once.
| Approach | Useful when | Decision or limitation |
|---|---|---|
| Destructive rename | An offline change with all consumers coordinated | Breaks old code during a mixed-version release |
| Expand and contract | Gradual migration with multiple consumers | Requires a compatibility window and retirement evidence |
| Canary rollout | Expose a small portion of traffic first | Needs meaningful signals and a stop condition |
| Application rollback | Restore an earlier compatible application | Cannot automatically restore a deleted schema or data |
| Infrastructure plan | Review declared state changes | Does not execute user workflows |
| Forward repair | Correct a change when rollback is unsafe | Needs a rehearsed operational decision and recovery data |
| Environment | What you can do | Scope |
|---|---|---|
| This browser lab | Click, compare, reset and inspect exact source | Actual PostgreSQL executes the migration and client reads. Traffic and readiness phases are an explicit browser model. The download includes a real loopback HTTP switch and a local-only Terraform plan exercise; no cloud deployment is started from this page. |
| Independent download | Run the same prebuilt lab with Python’s local server | No package installation or automatic external calls needed for the prebuilt preview |
| Native exercise | Run language tests and the included local adapter or script | Requires the documented local toolchain; does not provision a cloud service |
All safeguarded data reads return 200 across mixed versions and application rollback. The destructive path produces missing-column errors. The contract gate refuses to remove a column while an old reader remains.
Begin with an observable outcome, inspect the decisions that produced it, then test a repair. The companion tutorial explains the mechanism; the how-to guide takes the same source into an independent environment.
Verantos emphasizes incremental infrastructure changes, trusted CI/CD and explicit validation and rollback plans.
Eight explained steps, a source example and a checkpoint at each decision.
Read the tutorialUnderstand where each pattern helps and which tradeoffs remain.
Compare approachesDownload the independent environment, run the native checks and try a specific extension.
Open the how-to guideLab discussion / Safe Rollout Lab
Ask about the code, compare an approach, or describe an edge case. Reader comments are reviewed before publication.
Code walkthrough
These short excerpts connect the lab’s behavior to its implementation. Each example links to the full tutorial step for its context, tradeoffs and checkpoint. Names and dependencies belong to that source; the excerpts are not standalone programs.
Add the new field while keeping the old one. This gives new code somewhere to read without breaking existing consumers. The right production DDL strategy also depends on locking, table size, defaults and the database version; this tiny table demonstrates compatibility only.
ALTER TABLE profiles ADD COLUMN display_name text;
Copy existing values, then maintain both representations during the transition. A one-time backfill is insufficient if an old writer continues changing only the old field. This exercise’s compatible writer sets both fields; the extension challenge deliberately introduces an old writer.
UPDATE profiles SET display_name=full_name;
UPDATE profiles SET full_name=$1,display_name=$1 WHERE id=$2;
The readiness preset marks the canary unready. The browser models the traffic decision, while its data reads remain real. A production readiness probe must reflect the dependencies required to serve safely; a process merely listening on a port may not be sufficient.
if (!canaryReady) keepTrafficOnVersionOne();
The local exercise starts a real loopback HTTP service, switches its query to version two, then switches back after an injected readiness failure. It retains the expanded schema. Reverting an application does not automatically undo a migration or restore removed data.
activeVersion = 1; // retain the expanded schema
The old field may be removed only after old readers and writers are gone and backfill is complete. The gate explicitly checks all three. Production evidence may come from deployment inventory, job configuration and observability; the browser’s consumer count is a reviewed fixture.
oldReaders === 0 && oldWriters === 0 && backfillRemaining === 0