跳到正文
Skillpedia
数据库48k · #4335

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/database-migrations-sql-migrations/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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

  1. Migration Analysis Report: Detailed breakdown of changes
  2. Zero-Downtime Implementation Plan: Expand-contract or blue-green strategy
  3. Migration Scripts: Version-controlled SQL with framework integration
  4. Validation Suite: Pre and post-migration checks
  5. Rollback Procedures: Automated and manual rollback scripts
  6. Performance Optimization: Batch processing, parallel execution
  7. 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.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#4335
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能