drizzle-migrations

Automates PostgreSQL schema design and migration workflow for multi-tenant apps.

55|7|Updated Nov 7, 2025
One-click install
npx skills add https://github.com/wraps-team/wraps --skill drizzle-migrations-wraps-team
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drizzle-migrations
Source: https://github.com/wraps-team/wraps/tree/main/.claude/skills/drizzle-migrations
Command: npx skills add https://github.com/wraps-team/wraps --skill drizzle-migrations-wraps-team

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Drizzle migrations help teams evolve PostgreSQL schemas with Drizzle ORM in a predictable, organized way, ensuring consistency across projects and environments.

Core Features & Use Cases

  • Schema file organization under packages/db/src/schema/ with one file per domain (auth.ts, contacts.ts, workflows.ts, templates.ts, batch.ts) to keep domains decoupled.
  • Migration workflow with defined patterns for enums, indexes, and relations to enforce multi-tenant data integrity and scalable schemas.
  • Clear guidelines for generating, applying, and auditing migrations in a TypeScript-driven codebase.

Quick Start

Modify a schema file under packages/db/src/schema/ and run the project migration workflow to generate and apply the changes.

Frequently Asked Questions about drizzle-migrations

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

FAQPage Schema
How do I automate Drizzle ORM schema migrations for a PostgreSQL database?

To automate Drizzle ORM schema migrations for PostgreSQL, modify the relevant domain schema file and execute the project migration workflow to generate and apply the changes. This ensures schema consistency and predictable evolution across environments.

What is the best way to organize Drizzle ORM schemas across multiple domains?

Organizing Drizzle ORM schemas involves placing one file per domain under packages/db/src/schema/, such as auth.ts or contacts.ts. This decouples domains and enforces scalable, multi-tenant data integrity through structured schema definitions.

How do I add new fields and tables to a Drizzle ORM schema in TypeScript?

Adding new fields and tables to a Drizzle ORM schema requires modifying the corresponding domain TypeScript file. You then run the migration workflow to generate the migration, apply the schema changes, and audit the database state.

Does the Drizzle ORM migration workflow support multi-tenant PostgreSQL schemas?

Yes, the Drizzle ORM migration workflow supports multi-tenant PostgreSQL schemas by defining patterns for enums, indexes, and relations. These patterns enforce multi-tenant data integrity and ensure scalable database structures.

How do I generate and apply database migrations in a TypeScript-driven codebase?

Generating and applying database migrations in a TypeScript codebase involves modifying the schema file and running the defined migration workflow. This generates the migration scripts and applies them to the PostgreSQL database.

When do I need to adjust Drizzle ORM migrations for evolving domain schemas?

You need to adjust Drizzle ORM migrations when evolving domain schemas, adding fields, creating tables, or modifying enums and indexes. This maintains predictable schema organization and consistency across multi-tenant environments.