agentsclimarketplace

Schema migration safety

Skill yuchi-chang/no-cape/skills/schema-migration-safety

no-cape keeps the knowledge and drops the cape.

Install
npx -y skills add yuchi-chang/no-cape --skill schema-migration-safety

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use when writing database schema migrations or changing tables, columns, indexes, or constraints on a system with real data

SKILL.md

1.5 KB, 304 tokens by cl100k_base, as published. Nobody here has run it

Schema Migration Safety

Live data and running code make schema changes a deployment problem, not just a SQL problem: during every deploy, the old code version runs against the new schema.

Expand–contract

Never break in one step. Split every breaking change:

  1. Expand: add the new column/table/index alongside the old. Deploy code that writes both, reads old.
  2. Migrate: backfill data; switch reads to the new path.
  3. Contract: only after the old path is provably unused, remove it — in a later release.

A rename is a drop-and-add in disguise: same treatment.

Rules

  • Every migration has a tested rollback, or is explicitly documented as irreversible and confirmed with the user.
  • No large data transformation inside a schema migration — backfill in batches as a separate job. A migration that locks a big table is an outage.
  • Adding NOT NULL or constraints to existing columns: check existing data first, or add with a default / as NOT VALID, then validate separately.
  • Index creation on large tables: use the non-blocking variant (e.g. CREATE INDEX CONCURRENTLY in Postgres).
  • Destructive operations (DROP, mass DELETE/UPDATE): state the affected row counts, confirm a verified backup exists, and get explicit confirmation before running.

Smell test

"Old app version + new schema: does every query still work?" If no, another expand step is missing.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.