db-migrate

Generate and validate database migration SQL against production schemas.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/rawhit-r/ai-files --skill db-migrate-rawhit-r
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: db-migrate
Source: https://github.com/rawhit-r/ai-files/tree/main/.gemini/db-migrate
Command: npx skills add https://github.com/rawhit-r/ai-files --skill db-migrate-rawhit-r

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates creation and validation of production-ready database migrations, ensuring schemas stay in sync with production and avoiding seed conflicts.

Core Features & Use Cases

  • Generate migration SQL from change requests (create, alter, drop) for microservice databases.
  • Validate migrations against the production schema and existing migrations to prevent conflicts.
  • Enforce utf8mb4_unicode_ci collation and int-based timestamps for new tables.
  • Detect and prevent seed file conflicts that could override migrations.
  • Template-driven SQL (ALTER and CREATE) with backward-compatible defaults.

Quick Start

Describe the required table change and run the migration tool to generate and validate the SQL migration against the production schema.

Frequently Asked Questions about db-migrate

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

FAQPage Schema
How do I generate and validate SQL migrations against a production schema?▼

To generate and validate SQL migrations, describe the required table changes and run the migration tool to automatically create and validate the SQL against the production reference, preventing schema conflicts.

What are common database migration conflicts and how do I prevent seed conflicts?▼

Seed conflicts occur when seed files override schema migrations. You can prevent seed conflicts by validating migrations against existing files, ensuring new tables enforce utf8mb4_unicode_ci collation and int-based timestamps.

Can I use automated migration templates for microservice database schemas?▼

Yes, you can use template-driven SQL generation for microservice database schemas. The templates automate CREATE and ALTER statements with backward-compatible defaults to safely align with production.

Why does my database migration fail when altering columns in production?▼

Altering columns fails when migrations lack production alignment or violate schema constraints. Validating changes against the production reference ensures new tables enforce required collation and int-based timestamps.

What is the best way to enforce utf8mb4_unicode_ci collation during schema migration?▼

The best way to enforce utf8mb4_unicode_ci collation is using automated migration generation that strictly requires this collation for all new tables, ensuring your database schema stays synchronized with production.