跳到正文
FunCoding

migration-writer

Write safe, reversible database migrations for this repo's conventions. Use for any schema change.

Star
759
许可证
MIT
最近提交
2026年7月15日

skills/migration-writer/SKILL.md

在 GitHub 上查看

Migration Writer

  1. Read the current schema first. Match the repo's migration tool and naming (NNN_<verb>_<noun>).
  2. Write BOTH up and down. A migration you can't reverse is a migration you can't deploy safely.
  3. Live-safe: on a hot table, adding a NOT NULL column with no default, or an index without CONCURRENTLY, takes a blocking lock. Split into steps: add nullable → backfill → add constraint.
  4. Backfill large tables in batches, not one statement.
  5. Never edit an already-merged migration — add a new one. Test with a dry-run before committing. Output the migration + the exact deploy order.

相似的 Skill

精选

domain-modeling

编写词汇表,记录架构决策,澄清术语歧义。

MAmattpocock/skills336k近 7 天新增 4,217 个 star

writing-fragments

MAmattpocock/skills336k近 7 天新增 4,217 个 star

writing-shape

MAmattpocock/skills336k近 7 天新增 4,217 个 star

writing-beats

MAmattpocock/skills336k近 7 天新增 4,217 个 star

perfect-docs

MAmattpocock/skills336k近 7 天新增 4,217 个 star

writing-skills

OBobra/superpowers331k近 7 天新增 5,030 个 star