migration-safety-review

仓库创建 2026年7月28日最近提交 7 小时前SkillHot 收录 1 小时前
▸ 精选理由

上线前防止破坏性变更和长时间锁表导致的故障。

▸ 风险提示

会读取迁移与模式文件,可能接触敏感架构或数据信息

这个 Skill 做什么

审查数据库迁移以发现不可逆丢失、类型收窄与阻塞性锁表风险。

审查数据库 migration,重点找出会导致不可逆数据丢失或上线时把站点卡死的风险:丢列、收窄类型、NOT NULL 没默认值、非并发建索引等。上线前或做 schema review 时用,能在跑迁移前把坑挖出来。特点是直接指出危险改动并给出回填、分步迁移或并发索引等可行补救方案。

▸ 展开 SKILL.md 英文原文

Review a pending database migration for irreversible data loss and for locks that take the site down during deploy — dropped columns, narrowed types, NOT NULL without a default, and indexes built non-concurrently. Use before running any migration against a real database, or when reviewing a schema change.

开发编程数据库迁移不可逆变更上线安全通用
0
Stars
0
Forks
20
仓库内 Skill
积累中
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/sriptcollector/toolbay-skills/main/skills/migration-safety-review/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/sriptcollector/toolbay-skills/main/skills/migration-safety-review/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# Migration Safety Review

## Install

Save this file as `~/.claude/skills/migration-safety-review/SKILL.md`, or
`.claude/skills/migration-safety-review/SKILL.md` to scope it to one repo. Claude
Code auto-discovers it. Invoke with `/migration-safety-review` or by asking "is
this migration safe to run?".

## Why this exists

A migration is the one routine deploy step that can be unrecoverable. Application
bugs get rolled back; a dropped column is gone unless someone happens to have a
backup from before, and knows it, and can restore it under pressure.

Two independent risks, and reviews usually catch only the first:

1. **Data loss.** Destructive and irreversible.
2. **Locks.** Perfectly reve
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有