drizzle-safe-migrations

Coordinate Drizzle migrations with backfill-first sequencing and rollback planning.

1|Updated Mar 27, 2026
One-click install
npx skills add https://github.com/leonanpereirapinto/ai-utils --skill drizzle-safe-migrations-leonanpereirapinto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drizzle-safe-migrations
Source: https://github.com/leonanpereirapinto/ai-utils/tree/main/skills/typescript/drizzle-safe-migrations
Command: npx skills add https://github.com/leonanpereirapinto/ai-utils --skill drizzle-safe-migrations-leonanpereirapinto

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill coordinates production-safe Drizzle migrations to handle data backfills and constraint tightening in evolving schemas, reducing downtime and risk.

Core Features & Use Cases

  • Backfill-first migration workflow: generate and apply data backfills before tightening constraints.
  • Automatic schema migration generation and verification using drizzle tooling.
  • Deployment planning and rollback guidance with documented decisions and checklists.

Quick Start

Run the Drizzle migration workflow to plan, generate, and apply backfills and schema migrations safely.

Frequently Asked Questions about drizzle-safe-migrations

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

FAQPage Schema
How do I handle Drizzle migrations when tightening constraints in production?

Drizzle migrations for constraint changes require a backfill-first workflow: generate and apply data backfills before tightening constraints, reducing downtime and risk in evolving production schemas.

What is the safest way to backfill data before a schema migration?

The safest way to backfill data is to sequence backfills before schema migrations, using automated generation commands like bun run db:generate for both backfills and schema changes, then verify against drizzle/meta/_journal.json.

How do I verify Drizzle migration snapshots before deploying to production?

Verify Drizzle migration snapshots by checking drizzle/meta/_journal.json and migration snapshots after running automated generation commands, ensuring backfill-first sequencing and documented deployment decisions.

Can I use bun run db:generate for both backfills and schema migrations?

Yes, bun run db:generate is used for both backfills and schema migrations in a coordinated workflow that enforces backfill-first sequencing and requires verification against drizzle/meta/_journal.json and migration snapshots.

Does this Drizzle migration workflow include rollback planning?

Yes, the Drizzle migration workflow includes deployment planning and rollback guidance with documented decisions and checklists for production environments with evolving schemas.

When should I not use a backfill-first migration approach?

A backfill-first migration approach may not be necessary for simple additive schema changes that do not involve constraint tightening or data transformations in production environments.