·drizzle-orm-d1
{}

drizzle-orm-d1

jezweb/claude-skills

Build type-safe D1 databases with Drizzle ORM. Includes schema definition, migrations with Drizzle Kit, relations, and D1 batch API patterns. Prevents 18 errors including SQL BEGIN failures, cascade data loss, 100-parameter limits, and foreign key issues. Use when: defining D1 schemas, managing migrations, bulk inserts, or troubleshooting D1_ERROR, BEGIN TRANSACTION, foreign keys, "too many SQL variables".

647Installs·15Trend·@jezweb

Installation

$npx skills add https://github.com/jezweb/claude-skills --skill drizzle-orm-d1

SKILL.md

Status: Production Ready ✅ Last Updated: 2026-01-20 Latest Version: drizzle-orm@0.45.1, drizzle-kit@0.31.8, better-sqlite3@12.5.0 Dependencies: cloudflare-d1, cloudflare-worker-base

✅ Use db.batch() for transactions - D1 doesn't support SQL BEGIN/COMMIT (see Issue #1) ✅ Test migrations locally first - Always --local before --remote ✅ Use integer with mode: 'timestamp' for dates - D1 has no native date type ✅ Use .$defaultFn() for dynamic defaults - Not .default() for functions

❌ Never use SQL BEGIN TRANSACTION - D1 requires batch API ❌ Never use drizzle-kit push for production - Use generate + apply ❌ Never mix wrangler.toml and wrangler.jsonc - Use wrangler.jsonc only

Build type-safe D1 databases with Drizzle ORM. Includes schema definition, migrations with Drizzle Kit, relations, and D1 batch API patterns. Prevents 18 errors including SQL BEGIN failures, cascade data loss, 100-parameter limits, and foreign key issues. Use when: defining D1 schemas, managing migrations, bulk inserts, or troubleshooting D1_ERROR, BEGIN TRANSACTION, foreign keys, "too many SQL variables". Source: jezweb/claude-skills.

View raw

Facts (cite-ready)

Stable fields and commands for AI/search citations.

Install command
npx skills add https://github.com/jezweb/claude-skills --skill drizzle-orm-d1
Category
{}Data Analysis
Verified
First Seen
2026-02-01
Updated
2026-02-18

Quick answers

What is drizzle-orm-d1?

Build type-safe D1 databases with Drizzle ORM. Includes schema definition, migrations with Drizzle Kit, relations, and D1 batch API patterns. Prevents 18 errors including SQL BEGIN failures, cascade data loss, 100-parameter limits, and foreign key issues. Use when: defining D1 schemas, managing migrations, bulk inserts, or troubleshooting D1_ERROR, BEGIN TRANSACTION, foreign keys, "too many SQL variables". Source: jezweb/claude-skills.

How do I install drizzle-orm-d1?

Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/jezweb/claude-skills --skill drizzle-orm-d1 Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code or Cursor

Where is the source repository?

https://github.com/jezweb/claude-skills