
D1 Drizzle Schema
Generate Drizzle ORM schemas for Cloudflare D1 with D1-specific column patterns, migrations, and docs.
- skills.sh installs
- 1.7K
- GitHub stars
- 1.1K
- last updated
- Aug 21, 2026
What it does
- Covers the schema workflow: data model, Drizzle table definitions, relations, exported types, drizzle config, and migration scripts
- Includes
DATABASE_SCHEMA.mddocumentation, a bulk insert pattern that respects the 100 bound parameter limit, and runtime query examples - Enforces D1 differences such as always-on foreign keys, booleans and timestamps stored as integers, and JSON stored as TEXT
- Designed for creating a new D1 database, adding tables, or scaffolding a D1 data layer in Claude Code
Install
$ npx -y skills add jezweb/claude-skills --skill d1-drizzle-schema -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
D1 Drizzle Schema
Generate correct Drizzle ORM schemas for Cloudflare D1. D1 is SQLite-based but has important differences that cause subtle bugs if you use standard SQLite patterns. This skill produces schemas that work correctly with D1's constraints.
Critical D1 Differences
| Feature | Standard SQLite | D1 |
|---|---|---|
| Foreign keys | OFF by default | Always ON (cannot disable) |
| Boolean type | No | No — use integer({ mode: 'boolean' }) |
| Datetime type | No | No — use integer({ mode: 'timestamp' }) |
| Max bound params | ~999 | 100 (affects bulk inserts) |
| JSON support | Extension | Always available (json_extract, ->, ->>) |
| Concurrency | Multi-writer | Single-threaded (one query at a time) |
Workflow
Step 1: Describe the Data Model
Gather requirements: what tables, what relationships, what needs indexing. If working from an existing description, infer the schema directly.
Step 2: Generate Drizzle Schema
Create schema files using D1-correct column patterns:
import { sqliteTable, text, integer, real, index, uniqueIndex } from 'drizzle-orm/sqlite-core'
Details
- Repository
- github.com/jezweb/claude-skills
- Categories
- Databases, Backend & APIs
- First seen
- Apr 16, 2026
More from jezweb/claude-skills
All 64- Elevenlabs Agents1.7K
- Project Health1.6K
- Wordpress Setup1.6K
- Hono Api Scaffolder1.6K
- Landing Page1.5K
- Design Review1.5K
- Mcp Builder1.4K
- Social Media Posts1.4K
- Ai Image Generator1.4K
- Cloudflare Worker Builder1.4K
- Shopify Products1.4K
- Github Release1.4K
- React Native1.3K
- React Patterns1.3K
- Resume Cover Letter1.3K
- Proposal Writer1.3K
- Google Chat Messages1.3K
- Aussie Business English1.3K
- Shopify Setup1.3K
- Project Docs1.3K
- Git Workflow1.3K
- Shopify Content1.2K
- Vite Flare Starter1.2K
- Deep Research1.2K
Similar to D1 Drizzle Schema
More Databases
d1-migrationjezweb/claude-skills1.2K installsMigration workflow for Cloudflare D1 that generates with Drizzle and flags destructive SQL before applying.
drizzle-orm-patternsgiuseppe-trisciuoglio/developer-kit5.9K installsComprehensive Drizzle ORM guide for type-safe schemas, queries, relations, transactions, and migrations across five databases.
database-schemaalinaqi/maggy200 installsSchema-first guardrail that makes Claude read and verify database schemas before writing queries.
drizzle-migrationsbobmatnyc/claude-mpm-skills1.3K installsMigration-first Drizzle ORM workflow for TypeScript projects that writes SQL migrations before schema code.
database-migrationsaffaan-m/ecc6.9K installsSchema migration patterns for PostgreSQL, Prisma, Drizzle, Kysely, Django, and golang-migrate with zero-downtime and rollback guidance.