Codebase and Database Migration Rollouts

Plan and implement staged codebase or database migrations with compatibility checks, resumable backfills, and recovery gates.

Development / Engineeringdatabase-migrationscodebase-migrations
by AgentVoltv1.0.0
Free to sign up · every skill included with AgentVolt Pro

Before & after

Same prompt, same agent — the only difference is the skill.

Prompt“Plan a safe migration from MySQL to PostgreSQL without downtime”
Beforegeneric AI agent
A database migration like this is complex and requires careful planning. You'll want to start by backing up all your data, then setting up a parallel PostgreSQL environment. Test the schema migration and data conversion in a staging environment first. Make sure to test your application thoroughly to ensure it works with PostgreSQL. You should plan for a cutover window, ideally during low-traffic periods. Having a rollback plan is critical in case something goes wrong. You might want to perform a dry run of the entire migration process. It's important to notify stakeholders and plan communication around the migration. Would you like help thinking through any specific part of this plan?
Afterwith Codebase and Database Migration Rollouts
MIGRATION PLAN: MySQL to PostgreSQL

PRE-MIGRATION VALIDATION
  Database size: 240 GB
  Peak concurrent connections: 45
  Latest backup: 2 hours old, restore tested
  Application: Connection strings NOT yet updated (blocking issue)
  MySQL-specific functions found: 12 (FIND_IN_SET, etc.) requiring rewrite
  Timeline impact: +4 days for function conversion

PHASED CUTOVER
  PHASE 1 (Day 1): PostgreSQL provisioned. Schema migrated via pgloader. Data loaded (6-hour ETA for 240 GB). Indexes built and tested.
  PHASE 2 (Day 2-3): Staging app tested. Query performance benchmarked. Stored procedures rewritten and validated.
  PHASE 3 (Day 4, 2 AM): Read traffic redirected to PostgreSQL (writes stay on MySQL for 2 hours). Monitor errors. Flip writes at 4 AM.
  PHASE 4 (Day 4, 4 AM): All traffic on PostgreSQL. Monitor for 4 hours. Keep MySQL online as hot standby for 48 hours.
  PHASE 5 (Day 6): Decommission MySQL after final validation.

SAFETY CHECKPOINTS
  Monitor every 15 minutes: Connection count, query latency, error rate
  Automatic rollback trigger: Any metric fails
  Rollback tested and timed: 8 minutes to revert

COMMUNICATION
  2 weeks prior: Announce maintenance to users
  24 hours prior: Warn of 2-4 hour maintenance window (2 AM)

About this skill

“The migration worked locally, but the deployment broke production.” This skill catches the gaps between a valid change and a safe rollout: old workers still running, backfills racing with new writes, and rollbacks that would lose data. It produces a staged implementation with explicit compatibility, verification, and recovery gates.

What it does

  • Orders schema, application, worker, and integration changes so intermediate deployment states remain compatible.
  • Designs resumable backfills with stable checkpoints, bounded batches, and rules for concurrent writes.
  • Separates application rollback, data repair, and backup restoration instead of treating a reverse script as guaranteed recovery.
  • Checks row coverage, transformed values, relationships, and live write behavior before switching traffic.
  • Handles framework and dependency upgrades through compatibility bridges, scoped changes, and behavior checks.
  • Reviews existing migration plans for lock risks, stale consumers, irreversible transformations, and unsafe cleanup.

What you get

A migration plan sized to your request, with ordered changes, pass/fail gates, stop conditions, and recovery actions. When implementation is requested and enough context is available, you also get migration code, backfill logic, and verification queries appropriate to your stack.

Best for

Engineers changing production schemas, moving data between systems, upgrading frameworks, or replacing interfaces while multiple application versions remain in service.

SKILL.md preview

SKILL.md
---
name: codebase-and-database-migration-rollouts
description: >-
  Plan and implement codebase or database migrations using dependency ordering, mixed-version compatibility checks, resumable backfills, and explicit cutover and recovery gates. Use when the user says "migrate this database", "upgrade this framework", "rename this column without downtime", "move these records to the new service", "my backfill keeps timing out", "my deployment breaks during the upgrade", or "review this migration plan".
---

# Codebase and Database Migration Rollouts

… (sign up to view the full skill)
Sign up to view, copy, and install the full skill

Featured in

More development skills

View all Development skills →