$npx skillfedfor your agent

drizzle-migrations

This skill guides you through Drizzle ORM's migration workflow for SQLite databases, covering schema definition, column types, and common changes like adding tables or indexes. Learn production-ready strategies for generating migrations, applying them in code, and managing relations between tables.

drizzle-migrations helps you generate and apply database schema changes with Drizzle ORM for SQLite.

AI-generated summary based on this skill's SKILL.md

164 27 MITupdated by curiositech

Decision gist · record as of 2026-07-14

drizzle-migrations helps you generate and apply database schema changes with Drizzle ORM for SQLite. This skill guides you through Drizzle ORM's migration workflow for SQLite databases, covering schema definition, column types, and common changes like adding tables or indexes. Learn production-ready strategies for generating migrations, applying them in code, and managing relations between tables.

manual: git clone https://github.com/curiositech/some_claude_skills → cp -r some_claude_skills/.claude/skills/drizzle-migrations ~/.claude/skills/drizzle-migrations
.claude/skills/drizzle-migrations/SKILL.md · version 82cb1aeb

Use it when

  • drizzle-migrations explains that `db push` applies schema changes directly to your database without creating migration files—ideal.
  • drizzle-migrations teaches you to modify your schema file by adding new table definitions or column properties.

Verify before relying

Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.

Same gist for agents: .md · .json

Install

curiositech/some_claude_skills/drizzle-migrations · repository language: TypeScript

Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I create drizzle migrations for SQLite?

drizzle-migrations guides you through generating and applying migrations using Drizzle ORM. Start by defining your schema in a TypeScript file, then run `drizzle-kit generate sqlite` to create migration files. Execute migrations in your application using `db.run()` or the push workflow. The skill covers schema definition, column types, relations, and production deployment strategies.

What's the difference between drizzle db push and generate migrate?

drizzle-migrations explains that `db push` applies schema changes directly to your database without creating migration files—ideal for development. The `generate migrate` command creates explicit migration files that you version control and apply later, essential for production. Use `push` for rapid prototyping and `generate migrate` for managed schema evolution across environments.

How do I add a table or column with drizzle-migrations?

drizzle-migrations teaches you to modify your schema file by adding new table definitions or column properties, then run `drizzle-kit generate sqlite` to create a migration. The generated migration file contains the SQL to add your table or column. Review the migration, commit it to version control, and apply it using your application's migration runner or `db push`.

How do I set up foreign key relations in drizzle-migrations?

drizzle-migrations covers defining relations between SQLite tables using the `relations()` helper and `.references()` on columns. Define a foreign key column with a type matching the referenced table's primary key, then use `.references(() => otherTable.id)`. Relations enable type-safe joins and queries. Generate migrations after defining relations to ensure referential integrity constraints.

What are drizzle-migrations production best practices?

drizzle-migrations recommends versioning all migration files in your repository, testing migrations in a staging environment before production, and using transactions for multi-step changes. Always review generated migrations before applying them. Use explicit migration files rather than `push` in production. Monitor migration execution and maintain rollback procedures for critical deployments.

How do I create indexes and write type-safe queries?

drizzle-migrations shows how to add indexes using `.index()` on table definitions, then generate migrations to apply them. For queries, use Drizzle's query builder with `.select()`, `.where()`, `.join()`, and `.groupBy()` for type-safe operations. Aggregations like `.count()` and `.avg()` are built-in. Migrations ensure indexes exist before queries rely on them for performance.

SKILL.md

Rendered from the published skill. Quoted content, verbatim.

Drizzle ORM Migrations

This skill helps you manage database schema changes using Drizzle ORM with SQLite.

When to Use

USE this skill for: - Adding new tables or modifying existing columns - Generating and running database migrations - Drizzle-specific query patterns and relations - SQLite schema best practices with Drizzle - Setting up Drizzle configuration

DO NOT use for:

(truncated - see the full file via the links below)

File tree — 1 file
.claude/skills/drizzle-migrations/SKILL.md

Let your AI agent find skills like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.

wish › “Generate and apply database migrations using Drizzle ORM”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

drizzle-orm-patterns
by giuseppe-trisciuoglio · giuseppe-trisciuoglio/developer-kit

Master Drizzle ORM development with patterns for schema definition, relations, and type-safe queries across five database dialects. Learn CRUD operations, transactions, migrations, and best practices for building robust database applications.

MITupdated Jun 2026
★ 311repo stars
drizzle
by bobmatnyc · bobmatnyc/claude-mpm-skills

Drizzle is a TypeScript-first ORM built for compile-time type safety and edge-runtime performance. Define schemas with SQL-like syntax, execute queries with full type inference, and manage one-to-many and many-to-many relations without runtime dependencies.

MITupdated Jul 2026
★ 62repo stars
drizzle-orm-d1
by secondsky · secondsky/claude-skills

drizzle-orm-d1 equips you with a complete type-safe ORM layer for Cloudflare D1 databases, handling schema definition, migration generation via Drizzle Kit, and D1-specific patterns like batch operations instead of traditional transactions. It includes templates for common queries, relations, and prepared statements, plus an error catalog addressing D1-specific issues like binding errors and foreign key constraints.

MITupdated Jul 2026
★ 196repo stars
drizzle-orm
by Mindrally · Mindrally/skills

Drizzle ORM is a lightweight, type-safe TypeScript ORM that treats SQL as a first-class citizen. This skill covers schema definition, database connections across PostgreSQL, SQLite, and Turso, relational queries, and performance patterns like proper indexing and pagination.

Apache-2.0updated Jun 2026
★ 202repo stars
postgres-drizzle
by ccheney · ccheney/robust-skills

Build type-safe database applications pairing PostgreSQL with Drizzle ORM. This skill covers schema design, relational queries, migrations via drizzle-kit, connection pooling, and common performance pitfalls like N+1 queries and missing indexes. Includes decision trees for modeling relationships and diagnosing slow queries.

MITupdated Jul 2026
★ 55repo stars
drizzle-best-practices
by honra-io · honra-io/drizzle-best-practices

Comprehensive reference for building PostgreSQL applications with Drizzle ORM, covering schema design, query patterns, and relational modeling across eight prioritized categories. Includes version-specific guidance for both v1 RC and legacy 0.45.x APIs, with correct and incorrect code examples for each pattern.

MITupdated May 2026
★ 18repo stars

More skills Drizzle Postgres (unlicensed) · Drizzle (Apache-2.0) · drizzle-sqlite-scaffold (MIT) · database-fundamentals (MIT)

Tags
schema-versioningorm-toolingdatabase-automationsql-generationtype-safe-queriesmigration-managementsqlite-specificdev-to-prod-workflow