migration

Generate and apply Drizzle ORM database migrations from TypeScript schema changes.

Updated Feb 3, 2026
One-click install
npx skills add https://github.com/RyoOsaka/claude-code-template --skill migration-ryoosaka
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migration
Source: https://github.com/RyoOsaka/claude-code-template/tree/main/examples/hono-backend/skills/migration
Command: npx skills add https://github.com/RyoOsaka/claude-code-template --skill migration-ryoosaka

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the creation of database migrations when you modify the schema, reducing manual effort and the risk of human error.

Core Features & Use Cases

  • Generate Drizzle ORM-compatible migration templates from changes to tables, columns, or constraints.
  • Produce the required TypeScript schema updates and the corresponding SQL migration scripts (drizzle/migrations) to keep your code and database in sync.
  • Support incremental changes including table additions, column additions, and schema alterations with guided steps for safe migrations.

Quick Start

Define the requested schema change using the argument hint and run the migration workflow to generate and apply the corresponding drizzle migration.

Frequently Asked Questions about migration

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

FAQPage Schema
How do I auto-create database migrations from schema changes in Drizzle ORM?

You can auto-create database migrations from schema changes by defining the requested schema change and running the migration workflow, which generates TypeScript schema updates and corresponding drizzle SQL scripts.

What types of schema modifications are supported when generating Drizzle migrations?

Generating Drizzle migrations supports incremental table additions, column additions, and schema alterations, producing both TypeScript schema files and SQL migration scripts.

Do I need PostgreSQL to use this database migration generator?

Yes, you need a local PostgreSQL or compatible database to use this database migration generator, along with Drizzle ORM and TypeScript, to apply the generated migration SQL scripts.

How does the migration workflow keep TypeScript schemas and database state in sync?

The migration workflow keeps TypeScript schemas and database state in sync by generating SQL scripts under drizzle/migrations and updating re-exports under src/db/schema.

Are there guided steps for safe schema alterations when applying drizzle migrations?

Yes, the workflow provides guided steps for safe schema alterations when applying drizzle migrations, including procedures for generating migration SQL, updating re-exports, and ensuring safe migrations with testing steps.