drizzle-migrations

Automate Drizzle ORM SQL migration creation, application, and production recovery.

1|2|Updated Apr 6, 2026
One-click install
npx skills add https://github.com/parisgroup-ai/imersao-ia-setup --skill drizzle-migrations-parisgroup-ai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: drizzle-migrations
Source: https://github.com/parisgroup-ai/imersao-ia-setup/tree/main/skills/drizzle-migrations
Command: npx skills add https://github.com/parisgroup-ai/imersao-ia-setup --skill drizzle-migrations-parisgroup-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents and resolves the common and high-risk issues that arise when generating, applying, and deploying Drizzle ORM migrations, including desync between SQL files, journal, and the database, mega-migrations, and production deploy failures.

Core Features & Use Cases

  • Migration generation and review: Guidance to generate migrations from schema edits and review SQL for destructive DDL, enum changes, and mega-migrations.
  • Apply and validate: Steps to apply migrations, validate state, and regenerate sync hashes to keep journal and DB aligned.
  • Desync diagnosis and production recovery: Procedures to detect orphaned files or hash mismatches and safely mark migrations as applied in production to recover Railway deployments.
  • Seeding patterns and best practices: Idempotent seed migration patterns and naming conventions to avoid broken deployments and parallel-development conflicts.

Quick Start

Generate, review, apply, and validate a new Drizzle migration for your schema change and then confirm journal and database counts match before pushing to production.

Frequently Asked Questions about drizzle-migrations

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

FAQPage Schema
How do I fix Drizzle ORM migration desync between SQL files and the database?▼

Resolve Drizzle ORM migration desync by detecting orphaned SQL files or hash mismatches, regenerating sync hashes, and validating counts across SQL files, journal entries, and the drizzle.__drizzle_migrations table.

How do I safely mark Drizzle migrations as applied in production on Railway?▼

To safely mark Drizzle migrations as applied in production on Railway, follow recovery procedures to update the journal tags and database state without running destructive DDL, ensuring deployment stability.

How do I generate and review Drizzle ORM SQL migrations for destructive changes?▼

Generate Drizzle ORM SQL migrations from schema edits and review the output SQL for destructive DDL, enum changes, and mega-migrations before applying to ensure safe database modifications.

What is the best way to rename Drizzle migration files and update journal tags?▼

The best way to rename Drizzle migration files involves updating the corresponding journal tags and regenerating sync hashes to maintain synchronization between the file system and database records.

How do I validate Drizzle migration state across SQL files and the database?▼

Validate Drizzle migration state by comparing and confirming counts across SQL files, journal entries, and the drizzle.__drizzle_migrations table to ensure all components are aligned.