Skip to content
Back to skills

Execute Database Migration

ASecurity

Use when planning, validating, testing, executing, or rolling back a database schema migration. Defaults to read-only validation and dry-run behavior; production mutation requires explicit confirmation and a recovery plan.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 17, 2026
ai-agentstestingdatabase

Security analysis

A100/100

Scanned October 17, 2026

npx -y skills add ByronScottJones/Agents --skill execute-database-migration --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Execute Database Migration?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Execute Database Migration
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/byronscottjones-execute-database-migration/badge)](https://www.skillsdirectory.com/skills/byronscottjones-execute-database-migration)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: execute-database-migration
user-invocable: false
description: "Use when planning, validating, testing, executing, or rolling back a database schema migration. Defaults to read-only validation and dry-run behavior; production mutation requires explicit confirmation and a recovery plan."
---

# Execute Database Migration

Implement `database.md` and `disaster-recovery.md` as a safe migration workflow.

## Parameters

- `database`: target identifier; never require a secret in chat.
- `migrationsPath`: default `db/migrations/`.
- `currentVersion`, `targetVersion`: detected unless supplied.
- `mode`: `validate`, `plan`, `test`, `execute`, or `rollback`; default `validate`.
- `dryRun`: default `true`.
- `backupRequired`: default `true` for execute and rollback.
- `checkBackwardCompatibility`: default `true`.
- `timeout`: default `30m`.
- `format`: `summary` or `json`; default `summary`.

## Workflow

1. Detect the migration framework and current schema version.
2. Validate syntax, ordering, checksums, permissions, and dependencies.
3. Analyze expand/migrate/contract compatibility with old and new application versions.
4. Test against representative sanitized data where possible.
5. For execute, require confirmation, verify backup/recovery readiness, apply the
   reviewed migration, and run schema and application smoke checks.
6. For rollback, prefer a tested down migration or restore procedure; report when
   rollback is impossible or destructive.

## Safety

- Never ask for or print database credentials.
- Never execute against production without explicit confirmation.
- Do not claim rollback support unless it has been verified.
- Capture timing, locks, affected rows, and validation results without sensitive data.

## Output

Return current and target versions, schema changes, compatibility findings,
backup status, execution status, smoke checks, rollback limits, and next steps.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.