drizzle-schema

Automate Drizzle ORM schema design and migrations for Cloudflare D1.

Updated Mar 28, 2026
One-click install
npx skills add https://github.com/cffrank/paperclip-skills-agents --skill drizzle-schema-cffrank
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drizzle-schema
Source: https://github.com/cffrank/paperclip-skills-agents/tree/main/skills/drizzle-schema
Command: npx skills add https://github.com/cffrank/paperclip-skills-agents --skill drizzle-schema-cffrank

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Drizzle ORM patterns for Cloudflare D1 help teams design scalable, type-safe database schemas and automate migration workflows without Prisma, addressing the unique constraints of D1's SQLite-based dialect.

Core Features & Use Cases

  • Schema Design: Define tables, relations, and indexes with Drizzle's sqlite support for D1, including type-safe defaults and constraints.
  • Migration & Workflow: Generate and apply migrations using drizzle-kit, ensuring additive changes and zero-downtime deployment across environments.
  • Query Patterns: Create robust, type-safe queries that align with D1 dialect and Drizzle patterns in real apps.

Quick Start

Scaffold a D1-based project and generate initial migrations for your schema.

Frequently Asked Questions about drizzle-schema

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

FAQPage Schema
How do I set up Drizzle ORM with Cloudflare D1 and SQLite?

To set up Drizzle ORM with Cloudflare D1, configure drizzle.config.ts for the SQLite dialect, define table schemas, and generate initial migrations using drizzle-kit to enable type-safe queries in your D1 project.

Can I generate zero-downtime migrations for D1 using drizzle-kit?

Yes, drizzle-kit generates additive migrations for D1 to ensure zero-downtime deployments. The workflow aligns with D1 migrations, allowing you to apply schema changes safely across different environments.

Does Drizzle ORM support type-safe queries for D1 database schemas?

Drizzle ORM provides type-safe queries for D1 by defining table structures, relations, and indexes with SQLite support, ensuring constraints and defaults are validated at compile time across app modules.

What is the best way to design a database schema for Cloudflare D1 without Prisma?

The best way to design a D1 schema without Prisma is using Drizzle ORM's SQLite dialect patterns to define tables, relations, and indexes, automating migration workflows and type-safe query generation.

How do I apply drizzle-kit generate output to Cloudflare D1 migrations?

You apply drizzle-kit generate output by running the D1 migration workflow, ensuring generated schema changes are synced to your D1 database through additive migrations and configured deployment scripts.