drizzle-migrations

Generate SQL migrations and TypeScript definitions with Drizzle ORM.

Updated Jan 30, 2026
One-click install
npx skills add https://github.com/MacPhobos/research-mind --skill drizzle-migrations-macphobos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drizzle-migrations
Source: https://github.com/MacPhobos/research-mind/tree/main/.claude/skills/toolchains-typescript-data-drizzle-migrations
Command: npx skills add https://github.com/MacPhobos/research-mind --skill drizzle-migrations-macphobos

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a robust, migration-first workflow for managing database schema changes in TypeScript/JavaScript projects using Drizzle ORM, ensuring consistency and preventing drift across environments.

Core Features & Use Cases

  • Migration-First Development: Enforces SQL migrations as the single source of truth for schema changes.
  • Automated Type Generation: Generates TypeScript definitions from SQL migrations.
  • Schema Drift Detection: Integrates with CI/CD to validate schema consistency.
  • Use Case: When developing a new feature that requires adding a users table with specific columns and constraints, use this Skill to create the SQL migration, generate TypeScript types, and ensure it passes CI checks before deployment.

Quick Start

Use the drizzle-migrations skill to create a new SQL migration file for adding a 'users' table.

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 migrations using Drizzle ORM in TypeScript?

To manage database schema migrations using Drizzle ORM, you can use a migration-first workflow that treats SQL migrations as the single source of truth. This approach generates TypeScript definitions from SQL files and validates schema consistency to prevent drift across environments.

What is the best way to prevent schema drift in a Drizzle ORM workflow?

The best way to prevent schema drift in a Drizzle ORM workflow is to integrate schema validation into your CI/CD pipeline. By enforcing SQL migrations as the single source of truth, the pipeline detects inconsistencies and ensures database schemas remain consistent across all deployment environments.

Can I generate TypeScript definitions directly from SQL migrations with Drizzle?

Yes, you can generate TypeScript definitions directly from SQL migrations with Drizzle. This automated type generation process reads your SQL migration files and outputs the corresponding TypeScript types, ensuring your application code stays synchronized with your database schema changes.

Does the Drizzle migrations workflow support common schema changes like adding columns or creating junction tables?

Yes, the Drizzle migrations workflow supports common schema changes including adding columns, creating junction tables, and modifying data types. It facilitates these patterns by creating corresponding SQL migrations that pass CI checks before deployment.

How do I add a new users table to my database using Drizzle migrations?

To add a new users table using Drizzle migrations, you create a new SQL migration file defining the table with its specific columns and constraints. The workflow then generates the TypeScript definitions and validates the schema through CI/CD before deployment.

When should I use a migration-first workflow for database schema evolution?

You should use a migration-first workflow for database schema evolution when you need to ensure consistency and prevent drift across environments in TypeScript and JavaScript projects. This approach is ideal when integrating schema validation directly into your CI/CD pipeline.