d1-drizzle-schema

Generate Drizzle ORM schemas for Cloudflare D1 databases with migrations.

Updated Feb 18, 2026
One-click install
npx skills add https://github.com/daveio/syn-horse --skill d1-drizzle-schema
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: d1-drizzle-schema
Source: https://github.com/daveio/syn-horse/tree/main/.agents/skills/d1-drizzle-schema
Command: npx skills add https://github.com/daveio/syn-horse --skill d1-drizzle-schema

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

Cloudflare D1 patterns complicate schema design; this skill generates Drizzle ORM schemas that respect D1 constraints, auto-exports types, and provides migration scaffolding to avoid runtime issues.

Core Features & Use Cases

  • Generates Drizzle ORM schemas tailored for Cloudflare D1, including correct column patterns for booleans, timestamps, JSON, and foreign keys.
  • Produces migration scripts and a DATABASE_SCHEMA.md to document the schema for future sessions.
  • Use Case: Build a new D1-based data layer for a Cloudflare Worker project with end-to-end schema, migrations, and documentation.

Quick Start

Describe your data model and run the template to scaffold D1-ready Drizzle schemas.

Frequently Asked Questions about d1-drizzle-schema

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

FAQPage Schema
How do I generate a Drizzle ORM schema for Cloudflare D1?▼

You generate a Drizzle ORM schema for Cloudflare D1 by describing your data model to produce D1-compatible schemas with correct column patterns for booleans, timestamps, JSON, and foreign keys.

Can I use Drizzle ORM migrations with Cloudflare Workers and D1?▼

Yes, you can use Drizzle ORM migrations with Cloudflare Workers by generating migration scripts alongside your D1 schema to scaffold a complete data layer and avoid runtime issues.

What are the limitations of Drizzle ORM with Cloudflare D1?▼

Drizzle ORM limitations with Cloudflare D1 involve schema design constraints that require specific column patterns for booleans, timestamps, JSON, and foreign keys to prevent runtime issues.

How do I document a D1 database schema for future development sessions?▼

To document a D1 database schema for future sessions, generate a DATABASE_SCHEMA.md file alongside your Drizzle ORM schemas and migration scripts during the scaffolding process.

Does Drizzle ORM support auto-exported types for Cloudflare D1 schemas?▼

Yes, Drizzle ORM supports auto-exported types for Cloudflare D1 schemas, generating type definitions directly from the schema to ensure type safety within your Cloudflare Workers deployments.