Install
openclaw skills install db-migrateDeep database migration workflow—expand/contract, backward-compatible deploys, backfills, locking risks, and verification. Use when changing production schemas safely with zero or low downtime.
openclaw skills install db-migrateProduction schema changes fail when old and new code disagree during rollout. Prefer expand/contract: add compatible changes first, remove old shapes later.
Trigger conditions:
Initial offer:
Use six stages: (1) classify change, (2) expand phase, (3) backfill & dual-write, (4) flip reads/writes, (5) contract phase, (6) verify & rollback). Confirm database engine (PostgreSQL, MySQL, etc.).
Goal: Additive vs destructive; lock risk (full table rewrite vs instant metadata change).
Exit condition: Migration labeled as expand or contract with risk notes.
Goal: Add nullable columns or new tables without breaking currently deployed code.
Goal: Throttled batch backfill; dual-write old and new representations during transition when needed.
Goal: Deploy code that reads new columns only after backfill completes; use feature flags for staged rollout.
Goal: Drop old columns only after no code references them (search repo, logs, feature usage).
Goal: Monitor errors, slow queries, replication lag; rollback = redeploy previous app version + avoid destructive steps until stable.