drizzle-migrations

Enforce migration-first PostgreSQL schema workflows for Drizzle ORM.

Updated May 20, 2026
One-click install
npx skills add https://github.com/Hollowvyn/cognipace-v2 --skill drizzle-migrations-hollowvyn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drizzle-migrations
Source: https://github.com/Hollowvyn/cognipace-v2/tree/main/.agents/skills/drizzle-migrations
Command: npx skills add https://github.com/Hollowvyn/cognipace-v2 --skill drizzle-migrations-hollowvyn

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you avoid schema drift and broken deployments by enforcing a migration-first workflow with Drizzle ORM and SQL as the source of truth.

Core Features & Use Cases

  • Migration-first rule: Ensures schema changes start with SQL migrations rather than code-first TypeScript definitions.
  • Type safety via generated snapshots/types: Uses Drizzle Kit generation and snapshots to keep TypeScript and database schema aligned.
  • Repeatable verification workflows: Supports CI checks (drift detection, dry-run push) and staging validation before production.

Quick Start

Use the drizzle-migrations skill to implement a new table by first writing the SQL migration with constraints and indexes, then running generation and CI-style checks to confirm schema consistency.

Frequently Asked Questions about drizzle-migrations

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

FAQPage Schema
How do I prevent database schema drift with Drizzle ORM and PostgreSQL?

To prevent database schema drift with Drizzle ORM, adopt a migration-first workflow using SQL migrations as the source of truth, then generate TypeScript types from those migrations to ensure alignment across environments.

What is the best way to manage Drizzle schema changes in CI pipelines?

The best way to manage Drizzle schema changes in CI is to validate consistency by running Drizzle Kit generate for snapshots, performing drift detection checks, and executing dry-run push validations before production deployment.

Do I need to write SQL migrations first or TypeScript schema first with Drizzle Kit?

With Drizzle Kit, you need to write SQL migrations first rather than code-first TypeScript definitions. After finalizing the SQL migration, you generate TypeScript schema to mirror the database changes.

How does Drizzle Kit generate TypeScript types from SQL migrations?

Drizzle Kit generates TypeScript types from SQL migrations by using the committed migration snapshots as the source of truth, ensuring the TypeScript schema mirrors the finalized database migration for type safety.

Why does my Drizzle schema drift between local and staging environments?

Drizzle schema drifts between local and staging when TypeScript definitions are modified directly instead of through SQL migrations. Enforcing a migration-first workflow with committed snapshots and CI dry-run checks prevents this inconsistency.

Can I use Drizzle Kit push for staging validation before production?

Yes, you can use Drizzle Kit push dry-run for staging validation before production. This workflow verifies schema consistency and detects drift across local, CI, and staging environments before applying changes.