360 Secure SkillHub
360 安全技能中心

DB Schema Migration Linter / 数据库迁移脚本检查器

面向 SQL 迁移文件的检查技能:以命令行扫描迁移目录,识别删除列、字段类型变更、可空性调整、索引删除等破坏性或后向不兼容变更,并校验迁移顺序,支持 JSON 输出。技能未附带可执行文件或安装方式,自定义规则、AI 修复建议与跨环境漂移检测被标注为 Pro 版能力。

kingaiwork
kingaiwork
热度 8.91
最近更新 2026-07-09 12:00:20
分类:开发依赖:代码执行 / 读写文件 / 第三方 API应用场景:代码审查 / DevOps

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add db-schema-migration-linter
Metadata
name
db-schema-migration-linter
description
Lint SQL migration files for backward compatibility and destructive changes. / 检查SQL迁移文件的后向兼容性和破坏性变更。
version
1.0.0
topics
["database","migration","sql","lint","数据库迁移","SQL检查"]
metadata
{"openclaw":{"requires":{"bins":["bash","curl"]},"emoji":"🗄️","homepage":"https://kingai.work/","install":[]}}

🗄️ DB Schema Migration Linter / 数据库迁移脚本检查器

Lint SQL migration files for backward compatibility and destructive changes. / 检查SQL迁移文件的后向兼容性和破坏性变更。

🦁 由 KingAI.Work 出品 — 智能进化|vip@kingai.work


The Problem / 痛点

Manual DB Schema Migration Linter / 数据库迁移脚本检查器 takes too long. This tool automates it.

The Solution / 方案

• Detects breaking schema changes before deployment / 在部署前自动识别数据库破坏性变更,终结线上事故 • Analyzes column type changes, nullable toggles, and index drops / 深度分析字段类型变更、可空性调整与索引删除,拒绝低级错误 • Validates migration order and sequential integrity / 检查迁移文件顺序与完整性,确保版本迭代不脱节 • Supports custom rule engine for team-specific policies (Pro) / 支持自定义规则引擎,适配团队专属策略 (Pro 专属) • Generates rollback-aware migration diff reports / 生成可回滚的迁移差异报告,一键回溯无压力 • Monitors historical migration drift patterns across environments (Pro) / 跨环境追踪历史迁移漂移模式,洞察数据库演进全貌 (Pro 专属)

Get Started / 上手

db-schema-migration-linter --path ./migrations/ --format json This scans all migration files for backward compatibility issues, outputting results as JSON. / 扫描所有迁移文件的后向兼容性问题,并以 JSON 格式输出结果。 

Real Scenarios / 实际场景

• A team deploys a new migration that removes a column, but a production query still uses it. The linter catches the destructive change and blocks the deployment. / 团队部署的迁移删除了某列,但线上查询仍在引用,检查器拦截破坏性变更,阻止部署上线。 • A junior developer accidentally marks a nullable field as NOT NULL. The tool flags the backward incompatible change, preventing data loss. / 初级开发者误将可空字段设为非空,工具标记向后不兼容变更,避免数据写入失败。 • During a major version upgrade, the linter validates all 50 accumulated migrations for hidden breaking changes across multiple environments. / 大版本升级时,检查器验证历史累积的 50 个迁移文件,确保多环境无隐藏断裂风险。

Plans / 定价

Free Pro
Core / 核心 ✅ ✅
Bulk / 批量 — ✅
AI / AI 增强 — ✅
Support / 支持 Community Priority

• Get AI-powered migration suggestions that fix issues automatically 获得 AI 驱动的自动修复建议,无需人工逐行排查 • Unlock custom rule sets for enterprise-grade compliance and audit trails 解锁企业级合规规则组与审计追踪,满足严格监管需求 • Access real-time drift detection across staging, QA, and production 跨预发布、测试与生产环境实时检测结构漂移,防患于未然\n\n

KingAI.Work — 智能进化|vip@kingai.work