Factory DB Migration

The operational discipline for running a destructive change against a production database — schema migrations, data backfills, one-shot RPCs, historical seed imports. Adjacent to `factory-data-layer.md` (schema design) and `factory-deployment.md` (where migrations execute in CI) — this skill is about the runbook around the act of mutating prod. Covers the three-stage write contract (preflight → mutate → verify → rollback), idempotency by natural key, layered backup independence (Layer C from `factory-security.md` / KAI-126 doctrine), human-gated execution, bidirectional update semantics, validation-at-parse-not-at-constraint, and the failure modes a senior DB engineer pattern-matches before opening a migration PR.

nonlinear-xyz ba31c5e 23.2 KB Updated

File contents

nonlinear-xyz/factory-kit/tree/main/skills/factory-db-migration commit ba31c5ed3d

Frequently asked questions

npx skillmds@latest add nonlinear-xyz/factory-db-migration