drizzle-migrations

Configure drizzle-kit migrations and compare generate versus push across SQL dialects.

Updated Jul 24, 2026
One-click install
npx skills add https://github.com/saad-tayyab/lumora --skill drizzle-migrations-saad-tayyab
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drizzle-migrations
Source: https://github.com/saad-tayyab/lumora/tree/main/.agents/skills/drizzle-migrations
Command: npx skills add https://github.com/saad-tayyab/lumora --skill drizzle-migrations-saad-tayyab

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up drizzle-kit migrations involves choosing between generate and push, writing a correct defineConfig, and navigating per-dialect quirks that differ across postgresql, mysql, sqlite, mssql, cockroach, and singlestore. This Skill orients you to that workflow so schema changes are applied safely and predictably. ## Core Features & Use Cases - defineConfig reference: Documents required fields (dialect, schema, out, dbCredentials) with a minimal postgresql example and Turso/libsql guidance. - Generate vs push decision guide: Explains when to write reviewable .sql migration files versus applying DDL directly to a live database, including the missing_hints approval flow for destructive changes. - Per-dialect quirks catalog: Covers dialect-specific behaviors such as SQLite table rebuilds, MySQL type-change confirmations, and MSSQL rename constraints. - Use Case: After editing a Drizzle schema file, use this Skill to decide whether to run generate for a production release or push for local iteration, and to configure .gitattributes so snapshot files stay out of code-review noise. ## Quick Start Load the drizzle-migrations skill and help me configure drizzle.config.ts and decide between generate and push for my PostgreSQL schema changes.

Frequently Asked Questions about drizzle-migrations

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

FAQPage Schema
How do I configure drizzle-kit with defineConfig?

Use defineConfig from drizzle-kit with the required fields dialect, schema, out, and dbCredentials. The same object works for both the CLI (loaded from drizzle.config.ts) and the SDK. Store credentials in environment variables rather than hard-coding secrets.

Drizzle generate vs push: which should I use?

Use generate for production releases and code-review workflows since it writes reviewable .sql files applied later. Use push for rapid local iteration since it applies DDL directly to the live database. Destructive push changes require explicit approval through the hints resolution loop.

Does drizzle-kit support Turso or libsql databases?

Yes, Turso is a first-class dialect value. Set dialect to 'turso' with the @libsql/client or @tursodatabase/serverless driver rather than using 'sqlite' as an alias. It shares the sqlite handler over the libsql driver.

Why does drizzle push ask for confirmation on some changes?

Push returns status 'missing_hints' for destructive operations like dropping a non-empty entity, changing a column's SQL type, or recreating a SQLite table to add a NOT NULL column. These require explicit approval via the hints resolution loop before applying.

How do I hide drizzle snapshot files in GitHub pull requests?

Add 'drizzle/**/meta/*_snapshot.json linguist-generated=true' to .gitattributes so GitHub Linguist collapses the generated snapshots by default. Adjust the leading directory to match your configured out directory, and do not broaden the glob to include meta/_journal.json.