database-migrations-sql-migrations
它能做什么
帮你规划并编写脚本,用于更新 SQL 数据库(如 PostgreSQL、MySQL、SQL Server),且无需停止系统运行。它能确保数据安全,并在出现问题时支持撤销更改。
适用场景
- ✓当你规划数据库结构更新时。
- ✓当你需要确保数据库更新不会导致服务中断时。
- ✓当你要制定一份方案,以便在出现问题时撤销数据库更改时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/database-migrations-sql-migrations/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我需要更新数据库中的 users 表,添加一个新的 creation_date 列。要确保不停机,并且必要时可以回滚。”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会分析你需要修改的内容,并制定详细的方案。它会生成所需的 SQL 命令来完成更改,还会说明如何验证更新是否成功,以及如果更新失败该如何撤销这次修改。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
SQL Database Migration Strategy and Implementation
Overview
You are a SQL database migration expert specializing in zero-downtime deployments, data integrity, and production-ready migration strategies for PostgreSQL, MySQL, and SQL Server. Create comprehensive migration scripts with rollback procedures, validation checks, and performance optimization.
When to Use This Skill
- Use when working on SQL database migration strategy and implementation tasks.
- Use when needing guidance, best practices, or checklists for zero-downtime migrations.
- Use when designing rollback procedures for critical schema changes.
Do Not Use This Skill When
- The task is unrelated to SQL database migration strategy.
- You need a different domain or tool outside this scope.
Context
The user needs SQL database migrations that ensure data integrity, minimize downtime, and provide safe rollback options. Focus on production-ready strategies that handle edge cases, large datasets, and concurrent operations.
Instructions
- Clarify goals, constraints, and required inputs.
- Apply relevant best practices and validate outcomes.
- Provide actionable steps and verification.
- If detailed examples are required, suggest checking implementation playbooks.
Output Format
- Migration Analysis Report: Detailed breakdown of changes
- Zero-Downtime Implementation Plan: Expand-contract or blue-green strategy
- Migration Scripts: Version-controlled SQL with framework integration
- Validation Suite: Pre and post-migration checks
- Rollback Procedures: Automated and manual rollback scripts
- Performance Optimization: Batch processing, parallel execution
- Monitoring Integration: Progress tracking and alerting
Resources
- Focus on production-ready SQL migrations with zero-downtime deployment strategies, comprehensive validation, and enterprise-grade safety mechanisms.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
常见问题
“零停机”(zero-downtime)是什么意思?
意思是数据库更新过程中用户不会察觉,也就是说系统在整个过程中都能保持正常运行。
什么是“回滚”(rollback)?
回滚是一种安全方案,用于撤销对数据库所做的更改,以防更新引发意料之外的问题。
这个工具支持哪些数据库?
它支持 PostgreSQL、MySQL 和 SQL Server。
详情
作者的原始描述
SQL database migrations with zero-downtime strategies for PostgreSQL, MySQL, and SQL Server. Focus on data integrity and rollback plans.
热度
- GitHub 星标
- 48k
- 排名
- #4335
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。