database-migrations-sql-migrations

Implement zero-downtime SQL migrations for PostgreSQL, MySQL, and SQL Server.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/chicanoandres702/SentientAIBrowser --skill database-migrations-sql-migrations
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migrations-sql-migrations
Source: https://github.com/chicanoandres702/SentientAIBrowser/tree/main/.agents/workflows/database-migrations-sql-migrations
Command: npx skills add https://github.com/chicanoandres702/SentientAIBrowser --skill database-migrations-sql-migrations

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Deploying schema changes across production databases without downtime is challenging and risks data loss. This Skill provides proven, production-ready strategies to perform PostgreSQL, MySQL, and SQL Server migrations with zero downtime, strong integrity guarantees, and safe rollback options.

Core Features & Use Cases

  • Zero-downtime migration patterns: Expand-Contract, Blue-Green, and Online Schema Change workflows with batching, backfills, and dual writes.
  • Automated validation & rollback: Pre- and post-migration checks, backups, and deterministic rollback procedures.
  • Production-grade guidance: Performance considerations, index handling, and safe deployment steps for large datasets.

Quick Start

Run the migration suite against your target database and verify pre- and post-migration checks.

Frequently Asked Questions about database-migrations-sql-migrations

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I perform zero-downtime SQL migrations on PostgreSQL and MySQL?

To perform zero-downtime SQL migrations, apply expand-contract, blue-green, or online schema change strategies. These patterns use batch data migration, dual writes, and careful backfills to update PostgreSQL, MySQL, or SQL Server schemas without disrupting production traffic.

What is the expand-contract pattern for database schema changes?

The expand-contract pattern separates schema changes into independent deployable phases to avoid locking. You first expand the schema to support both old and new versions, migrate data with backfills, and then contract by removing obsolete structures once traffic shifts entirely.

How do I safely rollback a failed database migration in production?

To safely rollback a failed database migration, implement deterministic rollback procedures paired with automated pre- and post-migration checks. Taking backups before execution and enforcing strong validation hooks ensures safe failure recovery and preserves data integrity if issues arise.

Does this approach support online schema changes for SQL Server?

Yes, the approach supports online schema changes for SQL Server alongside PostgreSQL and MySQL. It provides production-grade guidance for handling performance considerations, indexing, and safe deployment steps specifically designed for large datasets across these major database engines.

What is the best way to handle data backfills during blue-green deployments?

The best way to handle data backfills during blue-green deployments is using batch processing and dual writes. This ensures both the old and new schema versions stay synchronized while data is incrementally migrated, preserving data integrity without downtime.

When should I use dual writes for SQL migrations?

You should use dual writes during SQL migrations when transitioning between schema versions without downtime. Writing to both old and new structures simultaneously allows you to safely shift traffic, verify data consistency through post-migration checks, and maintain a rollback path.