Skip to main content

DevOps & Security

Schema Evolution Planner

Produces a zero-downtime schema evolution plan with additive changes, backfill scripts, concurrent index builds, and deprecation schedules. Useful for evolving production schemas without incident. Backend engineers and database owners evolving production schemas, platform teams supporting zero-downtime deploys, and tech leads sequencing schema changes across multiple deploys. The common failure mode is a single migration that tries to rename, retype, and re-constrain a column in one step — forcing either downtime or a deploy rollback. The safe pattern (expand → migrate → contract) is well-known but tedious to plan by hand. Automating the planning step turns a one-hour design exercise into a five-minute review.

Nexus CertifiedClaude CodeCodexOpenClawGoogle Antigravity
databaseschemamigrationszero-downtimeplanning

One-Time Purchase

$19.99

Sample Output

Schema Evolution Plan — users.nameusers.full_name, varchar(255)text

Engine: Postgres 15 · Table size: ~50M rows · Strategy: expand → migrate → contract

Verdict

Safe zero-downtime path — 3 app deploys over ~5 calendar days. Doing this as a single ALTER TABLE would take AccessExclusiveLock on a 50M-row table for the duration of the rewrite and trigger application errors as the column name changes underneath running code. The plan below is reversible at every phase and ships behind dual-write logic that the application controls.

Risk dimensions

Single-step `RENAME` + retype would break all readers/writers simultaneouslyHIGH
50M-row backfill — chunked, ShareUpdateExclusive onlyMEDIUM
`text` is binary-compatible with `varchar(n)` storage in PostgresLOW
No constraint changes; no FK pointing at `users.name`LOW

Dependencies

Touch points (must update at the right phase)

Application read paths referencing `users.name`14
Application write paths referencing `users.name`6
Analytics views in `reporting` schema3
ETL job into the data warehouse (overnight)1
Foreign keys pointing at `users.name` (none)0

Phased Deploy Plan

PhaseActionLockRiskApp version
1Add full_name text (nullable)Metadata onlyLowv1 (reader unchanged)
2App writes both name and full_namen/aLowv2 (dual-write)
3Chunked backfill full_name = name WHERE full_name IS NULLShareUpdateExclusiveMediumv2
4App reads from full_name, falls back to namen/aLowv3 (read-new)
5Drop reads on name; keep dual-writen/aLowv3
6ALTER TABLE … ALTER COLUMN full_name SET NOT NULL (after NOT VALIDVALIDATE)ShareUpdateExclusiveMediumv3
7Drop name columnAccessExclusive (brief)Mediumv4 (final)

Phase 1 — Add the new column

ALTER TABLE users ADD COLUMN full_name text;

Metadata only; no row rewrite. Sub-second lock.

Phase 2 — Dual-write from the application

// Drizzle insert/update
await db.update(users).set({ name: payload.name, fullName: payload.name }).where(...);

Ship v2 to all replicas before starting the backfill. The backfill is idempotent only when every new write is captured.

Phase 3 — Chunked backfill

-- Run in 50k-row batches, sleep 100ms between, monitor replication lag
DO $$
DECLARE batch_size int := 50000;
BEGIN
  LOOP
    WITH cte AS (
      SELECT id FROM users WHERE full_name IS NULL ORDER BY id LIMIT batch_size
    )
    UPDATE users SET full_name = name FROM cte WHERE users.id = cte.id;
    EXIT WHEN NOT FOUND;
    PERFORM pg_sleep(0.1);
  END LOOP;
END $$;

ShareUpdateExclusive is held per-batch only — does not block writes. Expected wall-clock: ~30–45 min for 50M rows on managed Postgres at medium load.

Phase 6 — Promote to NOT NULL via NOT VALID

ALTER TABLE users
  ADD CONSTRAINT users_full_name_not_null
  CHECK (full_name IS NOT NULL) NOT VALID;

ALTER TABLE users VALIDATE CONSTRAINT users_full_name_not_null;

NOT VALID is metadata-only; VALIDATE takes ShareUpdateExclusive and does not block writes. Then convert the check into a true NOT NULL on Postgres 12+:

ALTER TABLE users ALTER COLUMN full_name SET NOT NULL;
ALTER TABLE users DROP CONSTRAINT users_full_name_not_null;

Phase 7 — Drop name

ALTER TABLE users DROP COLUMN name;

AccessExclusiveLock but metadata-only — sub-second on a healthy 50M-row table. Schedule outside peak hours.


Rollback per Phase

Phases 1–5 — fully reversible

Until v4 ships, any phase can be reversed in seconds. Phase 1 rolls back with DROP COLUMN full_name. Phase 2 rolls back by deploying v1. Phase 3's backfill is idempotent and harmless to re-run. Phases 4 and 5 are application-only changes.

Phase 6 — reversible until app cuts over

Drop the check constraint to revert; the column remains nullable. After v4 ships and Phase 7 runs, you cannot recover name without a restore.

Phase 7 — point of no return

Once name is dropped, the only path back is a logical restore. Confirm v4 is deployed and stable for at least 24 hours before scheduling Phase 7. Take a logical backup of the users table immediately before the drop.


Before / After Summary

OperationSingle-step planPhased plan
Application downtimeRequiredNone
AccessExclusive lock duration10–30 min (rewrite)Sub-second (Phase 7 only)
Rollback costRestore from backupDrop a column / redeploy app
Calendar time1 deploy + recovery3 deploys over ~5 days
Engineer effort2h to plan + incident risk4h to plan; phases are routine

Plan is illustrative against a hypothetical users.nameusers.full_name evolution. Re-run timing estimates against representative staging data before scheduling production cutover.

This sample illustrates the skill's output format. Names, metrics, and operational details are illustrative unless the artifact explicitly analyzes public information.

View full sample →

All sales final. No refunds on digital products.

Includes support for Claude Code, Codex, OpenClaw, and Google Antigravity in the same license.

Also in Database Reliability

Bundle price: $55. Compare this skill with the full workflow bundle or Pro access.

Best for

Backend engineers and database owners planning a non-trivial schema change — column rename, type change, constraint addition — on a production table large enough that downtime is not an option. Most useful on Postgres and MySQL where the expand-migrate-contract pattern is well-defined.

Not ideal for

Schema-on-read systems (BigQuery, Snowflake) where the evolution model is different and zero-downtime concerns don’t apply the same way. Also a poor fit for schemas still in early development where the right move is to drop and recreate, not stage a multi-deploy migration.

Included in this purchase

  • Claude Code, Codex, OpenClaw, and Google Antigravity skill files.
  • Setup guidance for the right adapter in your workspace.
  • One-time license for the purchased skill version.

Setup

Plan for a short setup in the repository or workspace where the skill will run. Some coding familiarity helps for implementation-heavy outputs.

Claude CodeCodexOpenClawGoogle Antigravity

Related Skills

Incident Response
Outage Response Playbook
Generates structured, role-clear incident response playbooks for specific failure scenarios. Covers detection through resolution and post-mortem — ready to use when an incident actually happens.
Claude CodeCodexOpenClawGoogle Antigravity
outage-responsereliabilityrunbooks

$19.99

One-time license

View Skill
Incident Response
Incident Postmortem Writer
Generates a structured blameless postmortem from incident timelines, alerts, and deploy logs with root cause analysis, impact assessment, and owned action items. Useful for producing first-draft postmortems under operational pressure.
Claude CodeCodexOpenClawGoogle Antigravity
postmortemsincident-responseoperations

$19.99

One-time license

View Skill
Security Scanning
OWASP Top 10 Scanner
Scans code for OWASP Top 10 vulnerability patterns including injection, XSS, IDOR, and insecure deserialization with severity ratings and remediation snippets. Useful for pre-commit security checks and enterprise compliance.
Claude CodeCodexOpenClawGoogle Antigravity
securityowaspvulnerabilities

$19.99

One-time license

View Skill

Future Updates

This purchase includes the current version of the skill. If you want future adapter updates — meaning compatibility and packaging updates as supported platforms evolve — plus new catalog additions included automatically, upgrade to Pro.

Upgrade to Pro