agentsclimarketplace

Database migrations

Skill shinzoxD/knackbox/skills/coding/database-migrations

Plan and review database schema migrations for safety and rollback. Use whenever the user writes migrations, alters tables, backfills data, adds indexes, or asks how to deploy schema changes without downtime or lock pain.From its SKILL.md

Install
npx -y skills add shinzoxD/knackbox --skill database-migrations

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

One thing to look at

  • 0 stars0 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 file declares

Copied from the file, not written here

The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

2.0 KB, 348 tokens by cl100k_base, as published. Nobody here has run it

Database Migrations

Schema change is a production event. Expand/contract, avoid long locks, and never invent irreversible data loss as "fine".

Workflow

  1. State current schema, target schema, dialect, table size class if known.
  2. Classify: additive, destructive, rewrite, backfill, index-only.
  3. Prefer expand → migrate reads/writes → contract over in-place big bang.
  4. Call out locking, full table rewrites, and default-value rewrites on large tables.
  5. Plan online backfill (batched) separate from the schema DDL when needed.
  6. Define rollback / forward-fix and verification queries.

Output format

## Migration plan: <change>

**Dialect:** …
**Risk:** low | medium | high

### Steps
1. …

### SQL (or migration files)
…

### Locks / performance notes
…

### App deploy ordering
…

### Verify
…

### Rollback
…

Rules

  1. Never drop columns/tables before code stops reading them.
  2. Adding NOT NULL requires a default or multi-step backfill.
  3. Create indexes concurrently when the dialect and ops model support it.
  4. Separate long backfills from transactional DDL when possible.
  5. State assumptions about table size; ask if missing and risk depends on it.
  6. Do not run destructive SQL without an explicit user goal.

Edge cases

  • Multi-service shared DB: coordinate expand/contract across deployables.
  • Zero-downtime: dual-write or dual-read windows spelled out.
  • Data repair: treat as a scripted job with dry-run counts, not a sneaky migration.

What ships with it: 1 file

1.4 KB alongside SKILL.md

benchmarks/

Keep looking

Skills are one crate of 325,949. 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.