bobmatnyc avatar

Drizzle Migrations

Migration-first Drizzle ORM workflow for TypeScript projects that writes SQL migrations before schema code.

skills.sh installs
1.3K
GitHub stars
80
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the full migration cycle: SQL migration authoring, drizzle-kit generate, snapshot creation, TypeScript schema mirroring, and staging tests
  • Includes a domain-based schema folder layout with barrel index.ts exports and a sample GitHub Actions quality workflow
  • Enforces that schema changes start as numbered SQL files (0001_name.sql) rather than TypeScript-first definitions
  • Designed for teams using PostgreSQL with Drizzle who need schema drift detection in CI and rollback-ready versioning

Install

$ npx -y skills add bobmatnyc/claude-mpm-skills --skill drizzle-migrations -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Drizzle ORM Database Migrations (TypeScript)

Migration-first database development workflow using Drizzle ORM for TypeScript/JavaScript projects.

When to Use This Skill

Use this skill when:

  • Working with Drizzle ORM in TypeScript/JavaScript projects
  • Need to create or modify database schema
  • Want migration-first development workflow
  • Setting up new database tables or columns
  • Need to ensure schema consistency across environments

Core Principle: Migration-First Development

Critical Rule: Schema changes ALWAYS start with migrations, never code-first.

Why Migration-First?

  • ✅ SQL migrations are the single source of truth
  • ✅ Prevents schema drift between environments
  • ✅ Enables rollback and versioning
  • ✅ Forces explicit schema design decisions
  • ✅ TypeScript types generated from migrations
  • ✅ CI/CD can validate schema changes

Anti-Pattern (Code-First)

❌ WRONG: Writing TypeScript schema first

// DON'T DO THIS FIRST
export const users = pgTable('users', {
  id: uuid('id').primaryKey(),
  email: text('email').notNull(),
});

Details

Repository
github.com/bobmatnyc/claude-mpm-skills
Category
Databases
First seen
Apr 16, 2026

More from bobmatnyc/claude-mpm-skills

All 154

Similar to Drizzle Migrations

More Databases