drizzle-migrations

Generate and validate SQL migrations with Drizzle ORM for TypeScript projects.

Updated Aug 3, 2025
One-click install
npx skills add https://github.com/multideskio/vinha_admin_center --skill drizzle-migrations-multideskio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drizzle-migrations
Source: https://github.com/multideskio/vinha_admin_center/tree/main/.trae/skills/drizzle-migrations
Command: npx skills add https://github.com/multideskio/vinha_admin_center --skill drizzle-migrations-multideskio

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a migration-first database development workflow using Drizzle ORM for TypeScript/JavaScript projects, ensuring schema changes are versioned, auditable, and reproducible.

Core Features & Use Cases

  • Migration-first design: SQL migrations serve as the single source of truth, preventing drift between environments.
  • TypeScript integration: Generates TypeScript definitions from migrations for strong typing.
  • CI/CD readiness: Includes validation, snapshots, and checks to ensure migrations are safe before deployment.
  • Use Case: When adding a new table or altering a schema, start with a SQL migration and then generate/update TypeScript types.

Quick Start

Follow the migration-first workflow to initialize and apply Drizzle ORM migrations in your TypeScript project.

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

Database schema migrations with Drizzle ORM are managed using a migration-first workflow where SQL files act as the single source of truth, enabling you to apply versioned changes and generate TypeScript types automatically.

What is a migration-first workflow for TypeScript databases?

A migration-first workflow treats SQL migrations as the single source of truth for database schemas, preventing environment drift by generating TypeScript definitions from migrations rather than deriving SQL from code.

Can I validate Drizzle ORM migrations in a CI/CD pipeline?

Yes, Drizzle ORM migrations can be validated in CI/CD pipelines using built-in checks, schema snapshots, and consistency verification to ensure SQL migrations are safe before deployment.

How do I generate TypeScript types from SQL migrations in Drizzle?

TypeScript types are generated from SQL migrations by applying the migration files first, then running the type generation process to produce strong typing definitions that match the current database schema.

How do I prevent schema drift across environments using Drizzle ORM?

Schema drift is prevented by enforcing SQL-first migrations as the single source of truth, applying versioned SQL files consistently, and validating schema snapshots across all environments before deployment.