drizzle-migrations

Create and test SQL migrations for Drizzle ORM projects.

68|19|Updated Nov 21, 2025
One-click install
npx skills add https://github.com/bobmatnyc/claude-mpm-skills --skill drizzle-migrations-bobmatnyc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drizzle-migrations
Source: https://github.com/bobmatnyc/claude-mpm-skills/tree/main/toolchains/typescript/data/drizzle-migrations
Command: npx skills add https://github.com/bobmatnyc/claude-mpm-skills --skill drizzle-migrations-bobmatnyc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill solves the complexity and potential for errors in managing database schema changes, especially in TypeScript/JavaScript projects using Drizzle ORM, by enforcing a robust migration-first workflow.

Core Features & Use Cases

  • Migration-First Workflow: Ensures database schema changes are always initiated via SQL migrations, preventing drift and ensuring consistency.
  • Automated Type Generation: Generates TypeScript types directly from SQL migrations for type safety.
  • CI/CD Integration: Provides steps to integrate schema validation and dry-runs into CI pipelines.
  • Use Case: When developing a new feature that requires adding a new table and columns to your PostgreSQL database, use this Skill to create the SQL migration, generate corresponding TypeScript types, and test the changes in a staging environment before deploying to production.

Quick Start

Create a new SQL migration file for your Drizzle ORM project.

Frequently Asked Questions about drizzle-migrations

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

FAQPage Schema
How do I manage database schema changes with Drizzle ORM in TypeScript?

Database schema changes with Drizzle ORM are managed using a migration-first workflow that creates, generates, and tests SQL migrations to ensure schema consistency and type safety across environments. This approach prevents schema drift by enforcing structured SQL migration files.

What is a migration-first workflow for database schema evolution?

A migration-first workflow ensures database schema changes are always initiated via SQL migrations rather than direct schema modifications. This prevents drift and ensures consistency by generating TypeScript types directly from the SQL migrations for robust type safety.

How do I generate TypeScript types from SQL migrations in a JavaScript project?

TypeScript types are generated directly from your SQL migrations to maintain type safety in your JavaScript project. This automated type generation ensures your Drizzle ORM code accurately reflects the current database schema without manual interface definitions.

Can I integrate Drizzle ORM schema validation into CI/CD pipelines?

Drizzle ORM schema validation and dry-run checks can be integrated into CI/CD pipelines for automated testing. This provides steps to validate schema consistency and test migrations in staging environments before deploying to production.

What is the best way to test SQL migrations before deploying to production?

The best way to test SQL migrations before production is using automated dry-run checks within your CI/CD pipeline. This validates schema consistency in a staging environment, ensuring your Drizzle ORM migrations are safe to deploy.

Why use a migration-first approach instead of direct schema modifications?

A migration-first approach is used instead of direct schema modifications to prevent schema drift and ensure consistency. By initiating changes via SQL migrations, you guarantee type safety and enable reliable automated validation across development, staging, and production environments.