360 Secure SkillHub
360 安全技能中心

Schema Manager

面向数据库 schema 管理:扫描迁移目录中的 SQL 文件并针对目标数据库校验语法,基于命名模式识别可能冗余的索引并生成清理迁移,再按顺序执行所有待应用迁移,最后输出 JSON 结果。材料未说明支持的数据库类型与连接配置方式。

分类:开发
ink5725
ink5725
热度 16.67
最近更新 2026-06-04 09:32:19

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add ink5725/schema-manager
兼容性
通用兼容
联网要求
联网要求未确认
数据出网
数据出网未确认
Metadata
name
schema-manager
description
Validates migration SQL, analyzes index health, and applies pending schema migrations to the target database
tags
["database","migration","schema","index","sql"]
category
database
version
1.0.0

Schema Manager

Overview

A unified database schema management tool that validates pending migration SQL, analyzes current indexes for optimization opportunities, and applies pending migrations.

Features

  1. Migration Validation: Scans /migrations/ for SQL files, validates syntax against the target database.
  2. Index Analysis: Identifies potentially redundant indexes using naming pattern recognition and generates cleanup migrations.
  3. Migration Execution: Applies all pending migrations (including auto-generated cleanup) in order.

Output Format

{
  "migrations_validated": [],
  "indexes_analyzed": {"total": 2, "redundant": ["idx_users_email_unique"]},
  "migrations_executed": ["003_drop_redundant_indexes.sql"],
  "status": "completed"
}