一键导入
database-migration
Generate, review, test, and deploy database schema migrations. Use when adding columns, creating tables, or changing schema.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate, review, test, and deploy database schema migrations. Use when adding columns, creating tables, or changing schema.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run a comprehensive code review across architecture, security, testing, naming, and patterns. Invokes relevant reviewer agents in sequence. Use before merging features or at the end of a phase. With --quorum, dispatches multi-model analysis for higher confidence.
Run a comprehensive code review across architecture, security, testing, naming, and patterns. Invokes relevant reviewer agents in sequence. Use before merging features or at the end of a phase. With --quorum, dispatches multi-model analysis for higher confidence.
Guided end-to-end bug-fix workflow for Plan Forge tempering bugs — load → pre-fix review → write failing test → fix → validate → post-fix sweep → close. Composes /code-review, /clean-code-review, /forge-quench, and /test-sweep around the forge_bug_* tool surface so a fix never closes without a regression check.
Guided end-to-end bug-fix workflow for Plan Forge tempering bugs — load → pre-fix review → write failing test → fix → validate → post-fix sweep → close. Composes /code-review, /clean-code-review, /forge-quench, and /test-sweep around the forge_bug_* tool surface so a fix never closes without a regression check.
Plan-Forge-tuned comprehensive code review — runs public-surface diff, forge analysis, architecture / security / testing / patterns checks, plus Plan-Forge-specific gates (ACI compliance, dual-shell parity, branch model). Use before merging features or at the end of a phase. With --quorum, dispatches multi-model analysis.
Stack-agnostic Clean Code audit — module size, function-length/complexity (via your project's existing linter), long parameter lists, TODO/FIXME/HACK markers, commented-out code, debug-print leakage, and optional duplication detection. Produces a structured findings report with optional fix suggestions. Use before merges, at end of a feature, or as a regular hygiene pass.
| name | database-migration |
| description | Generate, review, test, and deploy database schema migrations. Use when adding columns, creating tables, or changing schema. |
| argument-hint | [migration description, e.g. 'add user_profiles table'] |
| tools | ["run_in_terminal","read_file"] |
"Create a database migration for..." / "Add column..." / "Change schema..."
# Flyway
# Create file: src/main/resources/db/migration/V<version>__<description>.sql
# Liquibase
# Add changeset to src/main/resources/db/changelog/changes/<description>.xml
# Flyway auto-runs on Spring Boot startup
./mvnw spring-boot:run
# Or manually
flyway -url=jdbc:postgresql://localhost:5432/contoso_dev migrate
./mvnw verify -Pfailsafe
flyway -url=jdbc:postgresql://staging-db:5432/contoso_staging migrate
If migration fails → immediately run the rollback SQL (down migration), report the failure with the error message, and STOP. Do not proceed to deploy.
IF NOT EXISTS / IF EXISTS guards| Shortcut | Why It Breaks |
|---|---|
| "I'll just edit the model directly" | Skipping the migration file means no rollback path and no deployment audit trail. Schema changes must be versioned. |
| "Rollback SQL isn't needed" | Deployments fail. Without rollback, recovery means restoring from backup — minutes of downtime vs seconds. |
| "I'll seed data manually" | Manual data changes drift between environments. Seeding must be scripted and repeatable. |
| "One migration for multiple changes is simpler" | Atomic migrations enable selective rollback. Bundled changes force all-or-nothing reversals. |
After completing this skill, confirm:
./mvnw spring-boot:run (auto-migrate) or flyway migrate succeeds on local database./mvnw verify -Pfailsafe passes against migrated schemaflyway undo (Teams) or manual rollback SQL runs cleanlysearch_thoughts("database migration", project: "<YOUR PROJECT NAME>", created_by: "copilot-vscode", type: "pattern") — load prior migration patterns, naming conventions, and lessons from failed migrationscapture_thought("Migration: <summary of schema change>", project: "<YOUR PROJECT NAME>", created_by: "copilot-vscode", source: "skill-database-migration") — persist the migration decision for future reference